svga: Fix debug build crash when rendering to depth/stencil renderbuffer only.
authorMichel Dänzer <daenzer@vmware.com>
Mon, 4 Jan 2010 12:05:43 +0000 (13:05 +0100)
committerMichel Dänzer <daenzer@vmware.com>
Mon, 4 Jan 2010 12:05:43 +0000 (13:05 +0100)
src/gallium/drivers/svga/svga_draw.c

index 8db40d0fd579aded538e8ab81f04cd31a150423c..ca73cf9d5a3a4bcdc573e3c40ea7b1ad16eb6c8e 100644 (file)
@@ -164,7 +164,8 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
       }
 
       SVGA_DBG(DEBUG_DMA, "draw to sid %p, %d prims\n",
-               svga_surface(svga->curr.framebuffer.cbufs[0])->handle,
+               svga->curr.framebuffer.cbufs[0] ?
+               svga_surface(svga->curr.framebuffer.cbufs[0])->handle : NULL,
                hwtnl->cmd.prim_count);
 
       ret = SVGA3D_BeginDrawPrimitives(swc,