[PATCH] EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_driver

Tiago Vignatti tiago.vignatti at nokia.com
Wed Nov 4 05:35:37 PST 2009


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 at nokia.com>
---
 exa/exa_driver.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/exa/exa_driver.c b/exa/exa_driver.c
index 9703695..a9165a1 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;
 }
-- 
1.6.0.4



More information about the xorg-devel mailing list