summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Damen <albrt@gmx.net>2009-04-05 16:36:35 +0200
committerEric Anholt <eric@anholt.net>2009-04-21 16:53:50 -0700
commitd7ca870e1ce251d42e3689a8e1e7d080ab1325fb (patch)
tree7dc375aa8ffc7667b56fdfebc5e27affbe912750
parent04ed92e3db8d9fcf2a1089ed433ab67bf0969655 (diff)
Fix crash with XV with large virtual display
If a virtual display with width > 2048 is used, the first time an XV buffer is needed will result in a BadAlloc error message, but the next time X would crash. Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r--src/i830_video.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 4ed30478..a62d7a13 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2392,6 +2392,7 @@ I830PutImage(ScrnInfoPtr pScrn,
return BadAlloc;
if (!pPriv->textured && drm_intel_bo_pin(pPriv->buf, 4096) != 0) {
drm_intel_bo_unreference(pPriv->buf);
+ pPriv->buf = NULL;
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Failed to pin xv buffer\n");
return BadAlloc;