mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 22:20:16 +01:00
randr: first check pScrPriv before using the pointer at RRFirstOutput
Fix a seg fault in case pScrPriv is NULL at ProcRRGetScreenInfo, which later calls RRFirstOutput. Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
4ba340cfaa
commit
32603f57ca
1 changed files with 3 additions and 0 deletions
|
|
@ -446,6 +446,9 @@ RRFirstOutput(ScreenPtr pScreen)
|
|||
RROutputPtr output;
|
||||
int i, j;
|
||||
|
||||
if (!pScrPriv)
|
||||
return NULL;
|
||||
|
||||
if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
|
||||
return pScrPriv->primaryOutput;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue