From 2c94da4e22520f4a3e783db06b73251131382868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 22 Apr 2010 14:16:59 +0200 Subject: [PATCH] EXA: Check sys_ptr isn't NULL before passing it to the UploadToScreen hook. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27380 . Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard (cherry picked from commit 7b6517526631a65891b806bca30be8f49955d0a8) --- exa/exa_accel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 4f94ae8bd..d4eae8960 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -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;