GtkApplication: avoid a crash

It can apparently happen that we get focus in events
on windows after gtk_application_shutdown() has been
called. Avoid an unnecessary crash in this case.

See
https://bugzilla.redhat.com/show_bug.cgi?id=1176339
This commit is contained in:
Matthias Clasen 2015-04-08 15:44:21 -04:00
parent c6a77d0f68
commit c0ac3c3386

View File

@ -506,7 +506,9 @@ gtk_application_focus_in_event_cb (GtkWindow *window,
priv->windows = g_list_concat (link, priv->windows);
}
gtk_application_impl_active_window_changed (application->priv->impl, window);
if (application->priv->impl)
gtk_application_impl_active_window_changed (application->priv->impl, window);
g_object_notify (G_OBJECT (application), "active-window");
return FALSE;