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

Marcin Slusarz marcin.slusarz at gmail.com
Mon May 16 12:52:05 PDT 2011


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



More information about the mesa-dev mailing list