diff options
author | Tim Janik <timj@gtk.org> | 2003-11-27 17:08:58 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 2003-11-27 17:08:58 +0000 |
commit | 5d49a7caf7e10a69fb25159f51b3eebdb92f774f (patch) | |
tree | 4832be6f97bae4741f717b3219ce9e49b8c832e0 /glib/gstrfuncs.c | |
parent | 0642df0ab3a705ec61bdbc915e15e7d7c2f4ed05 (diff) | |
download | glib-5d49a7caf7e10a69fb25159f51b3eebdb92f774f.tar.gz |
handle NULL arguments gracefully.
Thu Nov 27 17:04:08 2003 Tim Janik <timj@gtk.org>
* glib/gstrfuncs.c (g_strconcat): handle NULL arguments
gracefully.
* glib/gmacros.h: defined G_STRFUNC, which (pretty) prints the
current function (since G_STRLOC and G_GNUC_*FUNCTION became
unusable with gcc-3.0).
Diffstat (limited to 'glib/gstrfuncs.c')
-rw-r--r-- | glib/gstrfuncs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index a4d6b1737..e1662125d 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -214,7 +214,8 @@ g_strconcat (const gchar *string1, ...) gchar *concat; gchar *ptr; - g_return_val_if_fail (string1 != NULL, NULL); + if (!string1) + return NULL; l = 1 + strlen (string1); va_start (args, string1); |