[PATCH weston] Add a missing error check to weston_wm_handle_icon
Dima Ryazanov
dima at gmail.com
Sat Mar 17 04:09:00 UTC 2018
This fixes a crash when launching Duke Nukem Forever.
(Sorry, I wish I had a less ridiculous test case...)
Signed-off-by: Dima Ryazanov <dima at gmail.com>
---
xwayland/window-manager.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index c307e199..e9c60c1e 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -1368,6 +1368,9 @@ weston_wm_handle_icon(struct weston_wm *wm, struct weston_wm_window *window)
wm->atom.net_wm_icon, XCB_ATOM_ANY, 0,
UINT32_MAX);
reply = xcb_get_property_reply(wm->conn, cookie, NULL);
+ if (!reply)
+ return;
+
length = xcb_get_property_value_length(reply);
/* This is in 32-bit words, not in bytes. */
--
2.14.3
More information about the wayland-devel
mailing list