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

index 47be6f3c1858c7846a6988e4bb7b4ed6c2fda1fa..58afbbb279ed55abc9b45c19fcc46edb787d13bb 100644 (file)
@@ -222,6 +222,7 @@ int mgaUploadTexImages( mgaContextPtr mmesa, mgaTextureObjectPtr t )
         return -1;
       }
 
+      assert(t->base.memBlock);
       ofs = mmesa->mgaScreen->textureOffset[ heap ]
           + t->base.memBlock->ofs;