2007-06-19 Matthew Allum <mallum@openedhand.com>
authorMatthew Allum <mallum@openedhand.com>
Tue, 19 Jun 2007 14:47:33 +0000 (14:47 +0000)
committerMatthew Allum <mallum@openedhand.com>
Tue, 19 Jun 2007 14:47:33 +0000 (14:47 +0000)
        * clutter/clutter-main.c: (clutter_init_with_args), (clutter_init):
        Safer checks for setting progname if NULL is passed in init.

ChangeLog
clutter/clutter-main.c

index db1f121..57b169a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-19  Matthew Allum  <mallum@openedhand.com>
+
+       * 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  <ebassi@openedhand.com>
 
        * autogen.sh: autoreconf needs a README.
index 86a1748..39418d3 100644 (file)
@@ -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 ();