accept a NULL name and return NULL. Fixes warnings when starting gimp w/o

2002-11-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcontainer.c (gimp_container_get_child_by_name):
	accept a NULL name and return NULL. Fixes warnings when starting
	gimp w/o a gimprc.
This commit is contained in:
Sven Neumann 2002-11-17 23:39:46 +00:00 committed by Sven Neumann
parent 5749d04fe4
commit 9a8a6227c8
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-11-18 Sven Neumann <sven@gimp.org>
* app/core/gimpcontainer.c (gimp_container_get_child_by_name):
accept a NULL name and return NULL. Fixes warnings when starting
gimp w/o a gimprc.
2002-11-18 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcursor.c: removed commented out and unused

View File

@ -852,7 +852,9 @@ gimp_container_get_child_by_name (const GimpContainer *container,
const gchar *name)
{
g_return_val_if_fail (GIMP_IS_CONTAINER (container), NULL);
g_return_val_if_fail (name != NULL, NULL);
if (!name)
return NULL;
return GIMP_CONTAINER_GET_CLASS (container)->get_child_by_name (container,
name);