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>
(cherry picked from commit 9640407643)
This commit is contained in:
Tiago Vignatti 2009-11-04 15:35:37 +02:00 committed by Peter Hutterer
parent 269202982d
commit 05d6672a1b
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}