Signed-off-by: Peter Harris <phar...@opentext.com>
---
 xts5/XI/ChangePointerDevice.m |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/xts5/XI/ChangePointerDevice.m b/xts5/XI/ChangePointerDevice.m
index c7cb55f..dfd827a 100644
--- a/xts5/XI/ChangePointerDevice.m
+++ b/xts5/XI/ChangePointerDevice.m
@@ -160,6 +160,11 @@ int i, ndevices, savid;
            FAIL;
            }
        device = XOpenDevice(display, savid);
+       if (!device) {
+               tet_infoline("ERROR: XOpenDevice failed");
+               tet_result(TET_UNRESOLVED);
+               return;
+       }
        XCALL;
        if (verify_ptr(display, savid))
            CHECK;
@@ -210,6 +215,11 @@ char *buttons;
        XCALL;
        XSync(display, 0);
        dev = XOpenDevice (display, savid);
+       if (!dev) {
+               tet_infoline("ERROR: XOpenDevice failed");
+               tet_result(TET_UNRESOLVED);
+               return;
+       }
        DeviceMotionNotify(dev, dmn, dmnc);
        XSelectExtensionEvent (display, DRW(display), &dmnc, 1);
        XSync(display, 0);
@@ -314,6 +324,11 @@ int i, ndevices, savid;
            FAIL;
            }
        device = XOpenDevice(display, savid);
+       if (!device) {
+               tet_infoline("ERROR: XOpenDevice failed");
+               tet_result(TET_UNRESOLVED);
+               return;
+       }
        XCALL;
        if (verify_ptr(display, savid))
            CHECK;
@@ -700,6 +715,11 @@ XDevice bogus;
                FAIL;
 
        device = XOpenDevice(display, savid);
+       if (!device) {
+               tet_infoline("ERROR: XOpenDevice failed");
+               tet_result(TET_UNRESOLVED);
+               return;
+       }
        XCALL;
        XSync(display,0);
        if (verify_ptr(display, savid))
-- 
1.7.10.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to