From 77153d690a3673fdee7bef8e567816b754c43081 Mon Sep 17 00:00:00 2001 From: Albert Damen Date: Sun, 5 Apr 2009 16:36:35 +0200 Subject: 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 (cherry picked from commit d7ca870e1ce251d42e3689a8e1e7d080ab1325fb) --- src/i830_video.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3