GApplication: don't shutdown() on failure to start

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.
This commit is contained in:
Ryan Lortie 2012-11-24 13:20:29 -05:00
parent be008ea6e2
commit 543bbd8752

View 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);