Mesa (master): cell: added null ptr check in xm_flush_frontbuffer()

Brian Paul brianp at kemper.freedesktop.org
Tue Feb 24 15:34:54 UTC 2009


Module: Mesa
Branch: master
Commit: 66ddf1a00f7f730831c32b27e46515a0369487ff
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=66ddf1a00f7f730831c32b27e46515a0369487ff

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Feb 23 20:23:00 2009 -0700

cell: added null ptr check in xm_flush_frontbuffer()

---

 src/gallium/winsys/xlib/xlib_cell.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/winsys/xlib/xlib_cell.c b/src/gallium/winsys/xlib/xlib_cell.c
index c87564f..40bcdfe 100644
--- a/src/gallium/winsys/xlib/xlib_cell.c
+++ b/src/gallium/winsys/xlib/xlib_cell.c
@@ -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);
 }
 
 




More information about the mesa-commit mailing list