diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-09-23 14:35:58 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-09-23 14:38:08 -0400 |
commit | aff6835f1b854dfda1934e843d46a569c549c78c (patch) | |
tree | 2349eedbec0c7650a69bf10811dff4ca81a4f998 /gtk | |
parent | 1374645089e1e4d17b2e6c064a659813c2bf87a2 (diff) | |
download | gtk+-aff6835f1b854dfda1934e843d46a569c549c78c.tar.gz |
application: Be save against impl being NULL
We clear the impl in shutdown, so all callbacks that may
happen at a later time need to be prepared for this.
https://bugzilla.gnome.org/show_bug.cgi?id=755432
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkapplication.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index af13451928..ba7ef7b49e 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -723,7 +723,8 @@ gtk_application_window_removed (GtkApplication *application, old_active = priv->windows; - gtk_application_impl_window_removed (application->priv->impl, window); + if (priv->impl) + gtk_application_impl_window_removed (priv->impl, window); g_signal_handlers_disconnect_by_func (window, gtk_application_focus_in_event_cb, @@ -733,9 +734,9 @@ gtk_application_window_removed (GtkApplication *application, priv->windows = g_list_remove (priv->windows, window); gtk_window_set_application (window, NULL); - if (priv->windows != old_active) + if (priv->windows != old_active && priv->impl) { - gtk_application_impl_active_window_changed (application->priv->impl, priv->windows ? priv->windows->data : NULL); + gtk_application_impl_active_window_changed (priv->impl, priv->windows ? priv->windows->data : NULL); g_object_notify_by_pspec (G_OBJECT (application), gtk_application_props[PROP_ACTIVE_WINDOW]); } } |