Avoid a segfault in g_application_register()
authorMatthias Clasen <mclasen@redhat.com>
Tue, 11 Jan 2011 01:28:17 +0000 (20:28 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 11 Jan 2011 01:29:29 +0000 (20:29 -0500)
Patch by Mikkel Kamstrup Erlandsen
https://bugzilla.gnome.org/show_bug.cgi?id=639177

gio/gapplicationimpl-dbus.c

index ca072ac..406b839 100644 (file)
@@ -668,7 +668,7 @@ g_application_impl_register (GApplication       *application,
           g_free (impl->object_path);
 
           g_slice_free (GApplicationImpl, impl);
-          impl = NULL;
+          return NULL;
         }
     }
 
@@ -676,7 +676,7 @@ g_application_impl_register (GApplication       *application,
    * This also serves as a mechanism to ensure that the primary exists
    * (ie: DBus service files installed correctly, etc).
    */
-  impl->signal_id = 
+  impl->signal_id =
     g_dbus_connection_signal_subscribe (impl->session_bus, impl->bus_name,
                                         "org.gtk.Actions", NULL,
                                         impl->object_path, NULL,