summaryrefslogtreecommitdiff
path: root/exa/exa_driver.c
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@nokia.com>2009-11-04 15:35:37 +0200
committerKeith Packard <keithp@keithp.com>2009-11-05 13:27:55 -0800
commit964040764387d89ef64324cfbee31872ee6ce41c (patch)
treec1007143f6df3c24abac83a722843c40346ff26d /exa/exa_driver.c
parent7442f3355ab8f0bb2b1a270da18c65d8d315d4dd (diff)
EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_driver
It crash the server when the drawable is 32 bit and the framebuffer is 16. This is pretty much a copy-past from commit 8e873185. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'exa/exa_driver.c')
-rw-r--r--exa/exa_driver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/exa/exa_driver.c b/exa/exa_driver.c
index 97036955b..a9165a158 100644
--- a/exa/exa_driver.c
+++ b/exa/exa_driver.c
@@ -204,11 +204,13 @@ exaPixmapIsOffscreen_driver(PixmapPtr pPixmap)
{
ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv(pScreen);
+ pointer saved_ptr;
Bool ret;
+ 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;
}