diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2017-12-29 20:31:04 +0100 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2017-12-29 20:31:04 +0100 |
commit | a6fb4b007b4cd1abb406acb57efc041fba3d78f7 (patch) | |
tree | 96ee9ccaca30c970cb76311898feb6c1639ed180 | |
parent | 41649a1f9a37379f470dad34aa81bbb13d8b70c1 (diff) |
xwm_get_render_format: check NULL return value
-rw-r--r-- | xwayland/xwm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 5b710b85..470c4e63 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -1254,6 +1254,10 @@ static void xwm_get_render_format(struct wlr_xwm *xwm) { xcb_render_query_pict_formats(xwm->xcb_conn); xcb_render_query_pict_formats_reply_t *reply = xcb_render_query_pict_formats_reply(xwm->xcb_conn, cookie, NULL); + if (!reply) { + wlr_log(L_ERROR, "Did not get any reply from xcb_rrender_query_pict_formats"); + return; + } xcb_render_pictforminfo_iterator_t iter = xcb_render_query_pict_formats_formats_iterator(reply); xcb_render_pictforminfo_t *format = NULL; |