From a153cc3d244ec187b2152b1c1737fcc3038675fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 21 Apr 2010 10:46:16 +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=27510 . 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 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 7e2dd70..c20c9ac 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -504,7 +504,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; @@ -531,7 +531,8 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, pbox++; } - } + } else + goto fallback; } else goto fallback; -- 1.7.0.4