st/xlib: Add assert to check for null pointer dereference.
authorVinson Lee <vlee@vmware.com>
Sun, 21 Feb 2010 00:23:44 +0000 (16:23 -0800)
committerVinson Lee <vlee@vmware.com>
Sun, 21 Feb 2010 00:23:44 +0000 (16:23 -0800)
src/gallium/state_trackers/glx/xlib/xm_api.c

index a274da0c62fcc46d5c5c19b442c409124c125788..4aac08a1084245dd3e2511afba013e018e84aa98 100644 (file)
@@ -1148,6 +1148,7 @@ void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height )
    if (!surf_front || !surf_back)
       return;
 
+   assert(pipe);
    pipe->surface_copy(pipe,
                       surf_front, x, y,  /* dest */
                       surf_back, x, y,   /* src */