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 bb426a4..6e6b21c 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;