diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-02 09:11:10 +0000 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2011-03-16 20:03:27 +0000 |
commit | 53fc18eef519be501392dc766c086ed39c4e9ffd (patch) | |
tree | 0a5feca72299a703917dd1dd25d681931a191c2e | |
parent | 2d1aeb44aaf99943a73457a84354cce6140a7445 (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)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-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 b4553842..b1eb3ed7 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -446,8 +446,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; |