[gtk+] GtkApplication: avoid a crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkApplication: avoid a crash
- Date: Wed, 8 Apr 2015 19:45:35 +0000 (UTC)
commit c0ac3c3386b555832ad0dc34745ad26dcd184fb4
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Apr 8 15:44:21 2015 -0400
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
gtk/gtkapplication.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 80658c5..91ef355 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]