diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-02 09:11:10 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-02 09:11:10 +0000 |
commit | d729ef02f2955f7476df4c65403bc1f8e705b780 (patch) | |
tree | aafca153266b895b363dad091120f5a933f3f69f | |
parent | 537fa55ed2449e91f3dd1e04abc720c6818d7227 (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>
-rw-r--r-- | src/intel_dri.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/intel_dri.c b/src/intel_dri.c index b80a7556..b577c7d9 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -432,8 +432,9 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion, ValidateGC(dst, gc); /* Wait for the scanline to be outside the region to be copied */ - if (pixmap_is_scanout(get_drawable_pixmap(dst)) - && intel->swapbuffers_wait) { + if (pixmap_is_scanout(get_drawable_pixmap(dst)) && + intel->swapbuffers_wait && + scrn->currentMode) { BoxPtr box; BoxRec crtcbox; int y1, y2; |