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 b80b608f4b98c633aba37680a16cbe15049c9377..a4fd002664bf9f913202170645e1b945b626506b 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);