EXA: Check sys_ptr isn't NULL before passing it to the UploadToScreen hook.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27380 .

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 7b65175266)
This commit is contained in:
Michel Dänzer 2010-04-22 14:16:59 +02:00
parent 7815b02e8d
commit 2c94da4e22

View file

@ -505,7 +505,7 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable,
(*pExaScr->info->DoneCopy) (pDstPixmap);
exaMarkSync (pDstDrawable->pScreen);
/* UTS: mainly for SHM PutImage's secondary path. */
} else {
} else if (pSrcExaPixmap->sys_ptr) {
int bpp = pSrcDrawable->bitsPerPixel;
int src_stride = exaGetPixmapPitch(pSrcPixmap);
CARD8 *src = NULL;
@ -532,7 +532,8 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable,
pbox++;
}
}
} else
goto fallback;
} else
goto fallback;