summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xi/xichangehierarchy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index c89cafbd5..cd4c1f5f0 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -271,11 +271,13 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES])
goto unwind;
XTestptr = GetXTestDevice(ptr);
+ BUG_RETURN_VAL(XTestptr == NULL, BadDevice);
rc = dixLookupDevice(&XTestptr, XTestptr->id, client, DixDestroyAccess);
if (rc != Success)
goto unwind;
XTestkeybd = GetXTestDevice(keybd);
+ BUG_RETURN_VAL(XTestkeybd == NULL, BadDevice);
rc = dixLookupDevice(&XTestkeybd, XTestkeybd->id, client, DixDestroyAccess);
if (rc != Success)
goto unwind;