GApplication: don't shutdown() on failure to start
authorRyan Lortie <desrt@desrt.ca>
Sat, 24 Nov 2012 18:20:29 +0000 (13:20 -0500)
committerRyan Lortie <desrt@desrt.ca>
Sat, 24 Nov 2012 18:20:29 +0000 (13:20 -0500)
If we fail to start (and don't register() or call startup()) then also
don't call shutdown().  This happens in the case of failing to parse
commandline arguments, for example.

gio/gapplication.c

index 91d7b4f..29a5149 100644 (file)
@@ -1621,7 +1621,7 @@ g_application_run (GApplication  *application,
       status = 0;
     }
 
-  if (!application->priv->is_remote)
+  if (application->priv->is_registered && !application->priv->is_remote)
     {
       g_signal_emit (application, g_application_signals[SIGNAL_SHUTDOWN], 0);