If dixLookupResourceByType did not return Success, it will have set the
pointer to NULL, so the second if will always be true.

Signed-off-by: Jamey Sharp <[email protected]>
---
 dix/events.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 6d0137d..b26e28a 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -5355,7 +5355,6 @@ ProcGrabButton(ClientPtr client)
        rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor, 
RT_CURSOR,
                               client, DixUseAccess);
        if (rc != Success)
-       if (!cursor)
        {
            client->errorValue = stuff->cursor;
            return (rc == BadValue) ? BadCursor : rc;
-- 
1.7.0

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to