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>
This commit is contained in:
Albert Damen 2009-04-05 16:36:35 +02:00 committed by Eric Anholt
parent 04ed92e3db
commit d7ca870e1c
1 changed files with 1 additions and 0 deletions

View File

@ -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;