diff options
author | Peter Harris <pharris@opentext.com> | 2013-06-11 12:58:38 -0400 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2013-07-02 11:47:12 -0400 |
commit | 655f422dbd5fbf845d6602a75f04185cd40f7a90 (patch) | |
tree | b7bc2be9025d24dd9dd3017a2c65d13e56225078 | |
parent | 885896d3b3eea00bce773e9f28c6a78b3111d2b8 (diff) |
XI/ChangePointerDevice: Check for XOpenDevice failures
Signed-off-by: Peter Harris <pharris@opentext.com>
-rw-r--r-- | xts5/XI/ChangePointerDevice.m | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xts5/XI/ChangePointerDevice.m b/xts5/XI/ChangePointerDevice.m index f80ced42..5cc2d921 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; @@ -704,6 +719,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)) |