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>
This commit is contained in:
parent
7442f3355a
commit
9640407643
|
@ -204,11 +204,13 @@ exaPixmapIsOffscreen_driver(PixmapPtr pPixmap)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
|
pointer saved_ptr;
|
||||||
Bool ret;
|
Bool ret;
|
||||||
|
|
||||||
|
saved_ptr = pPixmap->devPrivate.ptr;
|
||||||
pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
|
pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
|
||||||
ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
|
ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
|
||||||
pPixmap->devPrivate.ptr = NULL;
|
pPixmap->devPrivate.ptr = saved_ptr;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue