st/xorg: Don't segfault when debug printing
authorJakob Bornecrantz <jakob@vmware.com>
Tue, 10 Nov 2009 07:55:26 +0000 (08:55 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Tue, 10 Nov 2009 09:00:04 +0000 (10:00 +0100)
src/gallium/state_trackers/xorg/xorg_exa.c

index 19c0151e692ddc1ea67f480074a3985fea2632d1..35fba249969ebea131e8c2335ae3e2f81a65321b 100644 (file)
@@ -476,9 +476,9 @@ ExaPrepareComposite(int op, PicturePtr pSrcPicture,
    debug_printf("ExaPrepareComposite(%d, src=0x%p, mask=0x%p, dst=0x%p)\n",
                 op, pSrcPicture, pMaskPicture, pDstPicture);
    debug_printf("\tFormats: src(%s), mask(%s), dst(%s)\n",
-                render_format_name(pSrcPicture->format),
-                render_format_name(pMaskPicture->format),
-                render_format_name(pDstPicture->format));
+                pSrcPicture ? render_format_name(pSrcPicture->format) : "none",
+                pMaskPicture ? render_format_name(pMaskPicture->format) : "none",
+                pDstPicture ? render_format_name(pDstPicture->format) : "none");
 #endif
    if (!exa->pipe)
       XORG_FALLBACK("accle not enabled");