diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-02 13:04:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-09-02 13:06:54 +0100 |
commit | 529db4d5edf396757f4f10a2b3aac55ad7e0bbc1 (patch) | |
tree | e73f43293b02983b2d1359ce4e976c55fa628b6a /src/sna/sna_display_fake.c | |
parent | 9ac895fccba72c6d4c0e754ab5298ece7dc8632d (diff) |
sna: Check for output->randr_output before dereferencing
As we may call the ->detect() routines during the fallback initial
probing, we need to handle the case where the output callbacks are
called before RandR is setup.
Regresion from
commit 8ecb758697af42e8e68edee0d1945986470a9c04
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat Aug 31 19:44:50 2013 +0100
sna: Expand the array of fake outputs if the last is used
Reported-by: Andreas Reis <andreas.reis@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68843
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display_fake.c')
-rw-r--r-- | src/sna/sna_display_fake.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_display_fake.c b/src/sna/sna_display_fake.c index 3daa793c..06cd7148 100644 --- a/src/sna/sna_display_fake.c +++ b/src/sna/sna_display_fake.c @@ -130,7 +130,7 @@ sna_output_dpms(xf86OutputPtr output, int dpms) static xf86OutputStatus sna_output_detect(xf86OutputPtr output) { - if (output->randr_output->numUserModes) { + if (output->randr_output && output->randr_output->numUserModes) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(output->scrn); if (xf86_config->output[xf86_config->num_output-1] == output) |