savage: Add assert to check for null pointer dereference.
authorVinson Lee <vlee@vmware.com>
Sat, 27 Feb 2010 23:29:44 +0000 (15:29 -0800)
committerVinson Lee <vlee@vmware.com>
Sat, 27 Feb 2010 23:29:44 +0000 (15:29 -0800)
src/mesa/drivers/dri/savage/savagetex.c

index 1a748ee1264317e07aa2735dc0b68a5e4ebe9133..1523af4065fc9861e3d3a51a4d5c933cdf77da32 100644 (file)
@@ -1021,6 +1021,7 @@ static void savageUploadTexImages( savageContextPtr imesa, savageTexObjPtr t )
          return;
       }
 
+      assert(t->base.memBlock);
       ofs = t->base.memBlock->ofs;
       t->setup.physAddr = imesa->savageScreen->textureOffset[heap] + ofs;
       t->bufAddr = (GLubyte *)imesa->savageScreen->texVirtual[heap] + ofs;