Commit c9832d43748b2e9575ffb53b76f3bc76cfc7aed0

Ran Benita 2017-04-28T09:33:25

test/interactive-x11: handle NULL from xcb_wait_for_event Can happen in cases like: - There was an error between the error check and the call. - The internal poll() fails. Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/test/interactive-x11.c b/test/interactive-x11.c
index bb641dd..9829cf3 100644
--- a/test/interactive-x11.c
+++ b/test/interactive-x11.c
@@ -276,6 +276,10 @@ loop(xcb_connection_t *conn, struct keyboard *kbd)
         }
 
         event = xcb_wait_for_event(conn);
+        if (!event) {
+            continue;
+        }
+
         process_event(event, kbd);
         free(event);
     }