[gtk+] x11: Guard against NULL window
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] x11: Guard against NULL window
- Date: Tue, 19 Dec 2017 06:40:55 +0000 (UTC)
commit f393552fec79b0aebd77222a99b69c887214c964
Author: Timm Bäder <mail baedert org>
Date: Tue Dec 19 07:38:35 2017 +0100
x11: Guard against NULL window
Otherwise, the NULL parent window causes a crash in the
GDK_WINDOW_IS_DESTROYED call.
gdk/x11/gdkwindow-x11.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index f2e23df..c6d6e30 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]