[gnome-disk-utility] Bug 584962 – palimpsest SIGTRAPs on unknown flag



commit 26a5fb93f92cae975d428ec4c48e24c4fc5c6628
Author: David Zeuthen <davidz redhat com>
Date:   Mon Jun 15 12:07:02 2009 -0400

    Bug 584962 â?? palimpsest SIGTRAPs on unknown flag
    
    Use g_printerr() instead of g_error() for unknown options.

 src/palimpsest/gdu-main.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/palimpsest/gdu-main.c b/src/palimpsest/gdu-main.c
index d4251af..fbfbace 100644
--- a/src/palimpsest/gdu-main.c
+++ b/src/palimpsest/gdu-main.c
@@ -134,11 +134,13 @@ main (int argc, char **argv)
         GError *error;
 
         ret = 1;
+        shell = NULL;
 
         error = NULL;
         if (!gtk_init_with_args (&argc, &argv, "", entries, GETTEXT_PACKAGE, &error)) {
-                g_error ("%s", error->message);
-                exit (1);
+                g_printerr ("%s\n", error->message);
+                g_error_free (error);
+                goto out;
         }
 
         bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
@@ -195,6 +197,7 @@ main (int argc, char **argv)
         ret = 0;
 
  out:
-        g_object_unref (shell);
+        if (shell != NULL)
+                g_object_unref (shell);
         return ret;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]