dri: Assert pointer is not null before dereferencing.
authorVinson Lee <vlee@vmware.com>
Sat, 27 Feb 2010 10:18:06 +0000 (02:18 -0800)
committerVinson Lee <vlee@vmware.com>
Sat, 27 Feb 2010 10:18:06 +0000 (02:18 -0800)
src/mesa/drivers/dri/common/dri_util.c

index b80b608..a4fd002 100644 (file)
@@ -189,6 +189,7 @@ static int driBindContext(__DRIcontext *pcp,
     ** initialize the drawable information if has not been done before.
     */
 
+    assert(psp);
     if (!psp->dri2.enabled) {
        if (pdp && !pdp->pStamp) {
            DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);