From d30396cf0c654f27aa0342b9de07fe8206375442 Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Tue, 19 Jun 2007 14:47:33 +0000 Subject: [PATCH] 2007-06-19 Matthew Allum * clutter/clutter-main.c: (clutter_init_with_args), (clutter_init): Safer checks for setting progname if NULL is passed in init. --- ChangeLog | 5 +++++ clutter/clutter-main.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index db1f1212b..57b169a28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-19 Matthew Allum + + * clutter/clutter-main.c: (clutter_init_with_args), (clutter_init): + Safer checks for setting progname if NULL is passed in init. + 2007-06-19 Emmanuele Bassi * autogen.sh: autoreconf needs a README. diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index 86a1748b4..39418d3b1 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -598,8 +598,8 @@ clutter_init_with_args (int *argc, if (clutter_is_initialized) return CLUTTER_INIT_SUCCESS; - if (*argc > 0) - g_set_prgname (*argv[0]); + if (argc && *argc > 0 && *argv) + g_set_prgname ((*argv)[0]); clutter_base_init (); @@ -694,8 +694,8 @@ clutter_init (int *argc, if (clutter_is_initialized) return CLUTTER_INIT_SUCCESS; - if (*argc > 0) - g_set_prgname (*argv[0]); + if (argc && *argc > 0 && *argv) + g_set_prgname ((*argv)[0]); clutter_base_init ();