[Mesa-dev] [PATCH] st/xorg: fix crash triggered by rendercheck -t blend -f a8r8g8b8 -o Clear

Marcin Slusarz marcin.slusarz at gmail.com
Sun Jun 19 15:02:07 PDT 2011


On Mon, May 16, 2011 at 09:52:05PM +0200, Marcin Slusarz wrote:
> 
> ---
>  src/gallium/state_trackers/xorg/xorg_composite.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c
> index cadec59..9fdbc90 100644
> --- a/src/gallium/state_trackers/xorg/xorg_composite.c
> +++ b/src/gallium/state_trackers/xorg/xorg_composite.c
> @@ -271,7 +271,7 @@ picture_format_fixups(struct exa_pixmap_priv *pSrc, PicturePtr pSrcPicture, bool
>     boolean swizzle = FALSE;
>     unsigned ret = 0;
>  
> -   if (pSrc->picture_format == pSrcPicture->format) {
> +   if (pSrc && pSrc->picture_format == pSrcPicture->format) {
>        if (pSrc->picture_format == PICT_a8) {
>           if (mask)
>              return FS_MASK_LUMINANCE;
> @@ -286,7 +286,7 @@ picture_format_fixups(struct exa_pixmap_priv *pSrc, PicturePtr pSrcPicture, bool
>        return 0;
>     }
>  
> -   if (pSrc->picture_format != PICT_a8r8g8b8) {
> +   if (pSrc && pSrc->picture_format != PICT_a8r8g8b8) {
>        assert(!"can not handle formats");
>        return 0;
>     }
> -- 

Can someone commit this patch?

Marcin


More information about the mesa-dev mailing list