mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
randr: fix BUG_RETURN_VAL check
nvidia driver can call with numOutputs == 0 and outputs == NULL which is valid Signed-off-by: dasha_uwu <dasha@linuxping.win>
This commit is contained in:
committed by
Enrico Weigelt
parent
45de44f092
commit
545f6ca8b7
@@ -190,7 +190,7 @@ RRCrtcNotify(RRCrtcPtr crtc,
|
||||
/*
|
||||
* Copy the new list of outputs into the crtc
|
||||
*/
|
||||
BUG_RETURN_VAL(outputs == NULL, FALSE);
|
||||
BUG_RETURN_VAL(numOutputs != 0 && outputs == NULL, FALSE);
|
||||
memcpy(crtc->outputs, outputs, numOutputs * sizeof(RROutputPtr));
|
||||
|
||||
/*
|
||||
@@ -754,7 +754,7 @@ RRCrtcSet(RRCrtcPtr crtc,
|
||||
Bool crtcChanged;
|
||||
int o;
|
||||
|
||||
BUG_RETURN_VAL(outputs == NULL, FALSE);
|
||||
BUG_RETURN_VAL(numOutputs != 0 && outputs == NULL, FALSE);
|
||||
|
||||
rrScrPriv(pScreen);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user