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

Michel Dänzer michel at daenzer.net
Thu Nov 5 01:12:41 PST 2009


On Wed, 2009-11-04 at 15:35 +0200, Tiago Vignatti wrote: 
> 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;
>  }

Looks good to me, but maybe Maarten had a reason for not doing this so
I'll leave it to him to (n)ack.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer



More information about the xorg-devel mailing list