randr: Fix crash for NULL swap dispatch procs
authorRobert Morell <rmorell@nvidia.com>
Sat, 19 Apr 2014 01:29:42 +0000 (18:29 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 21 Apr 2014 18:44:02 +0000 (11:44 -0700)
The previous code was checking the wrong table for function pointers.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
randr/randr.c

index 3c97714..6e3f14b 100644 (file)
@@ -679,7 +679,7 @@ static int
 SProcRRDispatch(ClientPtr client)
 {
     REQUEST(xReq);
-    if (stuff->data >= RRNumberRequests || !ProcRandrVector[stuff->data])
+    if (stuff->data >= RRNumberRequests || !SProcRandrVector[stuff->data])
         return BadRequest;
     return (*SProcRandrVector[stuff->data]) (client);
 }