[gtk+] Avoid a critical
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Avoid a critical
- Date: Fri, 28 Nov 2014 04:21:58 +0000 (UTC)
commit e26fddc544c76bcc175a8b553525dcfb0daa8f67
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 27 18:22:52 2014 -0500
Avoid a critical
gtk_window_get_focus can return NULL, deal with it.
https://bugzilla.gnome.org/show_bug.cgi?id=740812
gtk/gtkpopover.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 38214c9..83a8111 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -311,7 +311,7 @@ window_focus_in (GtkWidget *widget,
focus = gtk_window_get_focus (GTK_WINDOW (widget));
- if (!gtk_widget_is_ancestor (focus, GTK_WIDGET (popover)))
+ if (focus == NULL || !gtk_widget_is_ancestor (focus, GTK_WIDGET (popover)))
gtk_widget_grab_focus (GTK_WIDGET (popover));
if (priv->grab_notify_blocked)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]