diff options
author | Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> | 2012-06-21 00:55:53 -0300 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-06-28 10:06:40 -0700 |
commit | 32603f57ca03b6390b109960f8bb5ea53ac95ecb (patch) | |
tree | d8585af68730f8d25bcb92becacee141fa916bb5 /randr | |
parent | 4ba340cfaa8d430c808566495f8deda0ff1b4424 (diff) |
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>
Diffstat (limited to 'randr')
-rw-r--r-- | randr/randr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/randr/randr.c b/randr/randr.c index 4d4298af9..103da48d7 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -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; |