summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-01-02 09:11:10 +0000
committerOwain G. Ainsworth <oga@openbsd.org>2011-05-29 23:08:25 +0100
commit0068a81d7c3f55157a379ab2c0a1023965904c4f (patch)
treea408adc10bb3e8100dcedec34bccd73514e718ae
parent685269795a6db1cda611d4c312f0214a82578ef8 (diff)
dri: Don't wait upon a NULL current mode
There is a race condition between the dri swapbuffers code and hotplugging whereby we might attempt to execute a wait upon a non-existent output. This causes a NULL dereference and a loud crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32770 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit d729ef02f2955f7476df4c65403bc1f8e705b780) Conflicts: src/intel_dri.c
-rw-r--r--src/intel_dri.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c
index e4504e4c..1fafd5e3 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -447,7 +447,8 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
/* Wait for the scanline to be outside the region to be copied */
if (pixmap_is_scanout(get_drawable_pixmap(dst)) &&
- intel->swapbuffers_wait) {
+ intel->swapbuffers_wait &&
+ scrn->currentMode) {
BoxPtr box;
BoxRec crtcbox;
int y1, y2;