st/xorg: fix crash triggered by rendercheck -t blend -f a8r8g8b8 -o Clear

This commit is contained in:
Marcin Slusarz 2011-05-16 21:52:05 +02:00 committed by Marek Olšák
parent badf0335ef
commit 54d1b718b8
1 changed files with 2 additions and 2 deletions

View File

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