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

index bb426a41122d6213709a333ddc843e1a19f3e82c..6e6b21cf2b9c0f88e0c3916c5c5ce7ce8b3a5c75 100644 (file)
@@ -155,6 +155,7 @@ int i810UploadTexImagesLocked( i810ContextPtr imesa, i810TextureObjectPtr t )
        return -1;
       }
       
+      assert(t->base.memBlock);
       ofs = t->base.memBlock->ofs;
       t->BufAddr = imesa->i810Screen->tex.map + ofs;
       t->Setup[I810_TEXREG_MI3] = imesa->i810Screen->textureOffset + ofs;