dri: Add assert to check for null pointer dereference.
authorVinson Lee <vlee@vmware.com>
Sun, 28 Feb 2010 00:51:17 +0000 (16:51 -0800)
committerVinson Lee <vlee@vmware.com>
Sun, 28 Feb 2010 00:51:17 +0000 (16:51 -0800)
src/mesa/drivers/dri/common/dri_util.c

index a4fd002..890ae51 100644 (file)
@@ -127,6 +127,7 @@ static int driUnbindContext(__DRIcontext *pcp)
     /* Let driver unbind drawable from context */
     (*psp->DriverAPI.UnbindContext)(pcp);
 
+    assert(pdp);
     if (pdp->refcount == 0) {
        /* ERROR!!! */
        return GL_FALSE;