summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrcaridade145 <[email protected]>2021-10-15 21:28:44 +0100
committerraveit65 <[email protected]>2021-10-23 13:55:05 +0200
commite4c1352520fa7b3c05ba6f6c59f6203fb63de6fe (patch)
tree6335db726c4e9e028f3099fe31dd9ff452f61800 /src
parent8a922da08440a3f560ab047479f73a2f8ab90065 (diff)
downloadmarco-e4c1352520fa7b3c05ba6f6c59f6203fb63de6fe.tar.bz2
marco-e4c1352520fa7b3c05ba6f6c59f6203fb63de6fe.tar.xz
Safeguard against calling gdk_x11_window_get_xid with a NULL GdkWindow
Diffstat (limited to 'src')
-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,