cell: added null ptr check in xm_flush_frontbuffer()
authorBrian Paul <brianp@vmware.com>
Tue, 24 Feb 2009 03:23:00 +0000 (20:23 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 24 Feb 2009 15:32:50 +0000 (08:32 -0700)
src/gallium/winsys/xlib/xlib_cell.c

index c87564f4dc1ed168a0ced5b8acaf910453e505eb..40bcdfe42a0f31eb4e462c72218b27932322c722 100644 (file)
@@ -222,7 +222,8 @@ xm_flush_frontbuffer(struct pipe_winsys *pws,
     * This function copies that XImage to the actual X Window.
     */
    XMesaContext xmctx = (XMesaContext) context_private;
-   xlib_cell_display_surface(xmctx->xm_buffer, surf);
+   if (xmctx)
+      xlib_cell_display_surface(xmctx->xm_buffer, surf);
 }