mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 20:28:19 +02: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>
(cherry picked from commit 32603f57ca)
This commit is contained in:
parent
b348cfd4b8
commit
ba0fe0092c
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