Commit 5a8f3121 authored by Peter Hutterer's avatar Peter Hutterer

test-xi2: add an extra NULL-check

Shuts up coverity because it doesn't know that by the time we get here, we're
guaranteed that the device exists. Otherwise the list() call a few lines above
would've failed and we wouldn't get here.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent 3ea8f020
......@@ -358,6 +358,10 @@ test_xi2(Display *display,
if (argc >= 1) {
XIDeviceInfo *info;
info = xi2_find_device_info(display, argv[0]);
/* info is alway valid, the list() call exits if the device
cannot be found, but let's shut up coverity */
if (!info)
deviceid = info->deviceid;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment