summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-26 08:59:18 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-26 08:59:18 +0100
commitaddfa653cf51fa45c7eae49be1fd722aaadf97d6 (patch)
treeb123c0ca9d333e9aeca2b82b081578d64adeb5b5
parentb880d8e0a9a32acd50333f72d695268c4819c29e (diff)
uxa: Prevent attempting to call intel_mode_fini() before PreInit runs
In the Ubuntu xserver it is apparently possible for the Screen to be deleted prior to being fully initialised. Make sure we don't crash in that situation! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55346 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/intel_display.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/intel_display.c b/src/intel_display.c
index 2a3a393c..60af4157 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -1770,6 +1770,9 @@ intel_mode_fini(intel_screen_private *intel)
{
struct intel_mode *mode = intel->modes;
+ if (mode == NULL)
+ return;
+
while(!list_is_empty(&mode->crtcs)) {
xf86CrtcDestroy(list_first_entry(&mode->crtcs,
struct intel_crtc,