From: Marcin Slusarz Date: Mon, 16 May 2011 19:52:05 +0000 (+0200) Subject: st/xorg: fix crash triggered by rendercheck -t blend -f a8r8g8b8 -o Clear X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=54d1b718b897742bf424f61f911e4ca8bbffa689;p=mesa.git st/xorg: fix crash triggered by rendercheck -t blend -f a8r8g8b8 -o Clear --- diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c index d4dc84a122b..b5dacd20bb5 100644 --- a/src/gallium/state_trackers/xorg/xorg_composite.c +++ b/src/gallium/state_trackers/xorg/xorg_composite.c @@ -237,7 +237,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; @@ -252,7 +252,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; }