summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/display.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/display.c b/src/core/display.c
index 3b52c8b4..7a6cf12e 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1615,8 +1615,11 @@ mouse_event_is_in_tab_popup (MetaDisplay *display,
GtkWidget *popup_widget = meta_ui_tab_popup_get_widget (screen->tab_popup);
if (ok1 && popup_widget != NULL)
{
- Window popup_xid = gdk_x11_window_get_xid (gtk_widget_get_window (popup_widget));
-
+ GdkWindow * window = gtk_widget_get_window (popup_widget);
+ if (window == NULL)
+ return FALSE;
+
+ Window popup_xid = gdk_x11_window_get_xid (window);
gboolean ok2 = XTranslateCoordinates (display->xdisplay,
event_window, popup_xid,
event_x, event_y,