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

index 5eec8c08cd68588be5ba555d58f323f2dc3d4f18..412f6d425518d0ed7d17a5923f7551e40f97cb92 100644 (file)
@@ -260,6 +260,7 @@ void r128UploadTexImages( r128ContextPtr rmesa, r128TexObjPtr t )
       }
 
       /* Set the base offset of the texture image */
+      assert(t->base.memBlock);
       t->bufAddr = rmesa->r128Screen->texOffset[heap] 
           + t->base.memBlock->ofs;