From 8e873185f4cbfb2a36e1f43fe7da47fd9fd5aeea Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 3 Sep 2009 19:11:02 +0200 Subject: EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_mixed. Otherwise we may incorrectly clobber it to NULL on repeated PrepareAccess calls. --- exa/exa_mixed.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c index 7ba62ea5f..01f87ba87 100644 --- a/exa/exa_mixed.c +++ b/exa/exa_mixed.c @@ -236,14 +236,16 @@ exaPixmapIsOffscreen_mixed(PixmapPtr pPixmap) ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); ExaPixmapPriv(pPixmap); + pointer saved_ptr; Bool ret; if (!pExaPixmap->driverPriv) return FALSE; + saved_ptr = pPixmap->devPrivate.ptr; pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); ret = pExaScr->info->PixmapIsOffscreen(pPixmap); - pPixmap->devPrivate.ptr = NULL; + pPixmap->devPrivate.ptr = saved_ptr; return ret; } -- cgit v1.2.3