x11: Guard against NULL window

Otherwise, the NULL parent window causes a crash in the
GDK_WINDOW_IS_DESTROYED call.
This commit is contained in:
Timm Bäder
2017-12-19 07:38:35 +01:00
parent fcbbaae63c
commit f393552fec

View File

@@ -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));