diff options
author | rcaridade145 <[email protected]> | 2021-10-15 21:28:44 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-10-26 12:14:04 +0200 |
commit | d5c241e50517bfefd462ecbb60ce4e202db0142b (patch) | |
tree | 500206b68d4435d87a2ea51f538b4aa704b9c44a /src/core/display.c | |
parent | 519b60c39e7bf4602e198186df383464dbc864c7 (diff) | |
download | marco-d5c241e50517bfefd462ecbb60ce4e202db0142b.tar.bz2 marco-d5c241e50517bfefd462ecbb60ce4e202db0142b.tar.xz |
Safeguard against calling gdk_x11_window_get_xid with a NULL GdkWindow
Diffstat (limited to 'src/core/display.c')
-rw-r--r-- | src/core/display.c | 7 |
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, |