summaryrefslogtreecommitdiff
path: root/gdk/x11
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-12-19 07:38:35 +0100
committerTimm Bäder <mail@baedert.org>2017-12-19 07:39:37 +0100
commitf393552fec79b0aebd77222a99b69c887214c964 (patch)
treeceb4278b13bbef0c308fae73340f23763a8b30a0 /gdk/x11
parentfcbbaae63c8b3587a75c2d017ec3e1c3870d2e07 (diff)
downloadgtk+-f393552fec79b0aebd77222a99b69c887214c964.tar.gz
x11: Guard against NULL window
Otherwise, the NULL parent window causes a crash in the GDK_WINDOW_IS_DESTROYED call.
Diffstat (limited to 'gdk/x11')
-rw-r--r--gdk/x11/gdkwindow-x11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index f2e23df5fe..c6d6e30f7b 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -2453,7 +2453,7 @@ gdk_x11_window_set_transient_for (GdkWindow *window,
return;
/* XSetTransientForHint() doesn't allow unsetting, so do it manually */
- if (!GDK_WINDOW_DESTROYED (parent))
+ if (!parent || !GDK_WINDOW_DESTROYED (parent))
XSetTransientForHint (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
GDK_WINDOW_XID (parent));