From: Vinson Lee Date: Sat, 27 Feb 2010 23:29:44 +0000 (-0800) Subject: savage: Add assert to check for null pointer dereference. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c007f42a128ad11c8e126443e0f040774901430;p=mesa.git savage: Add assert to check for null pointer dereference. --- diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c index 1a748ee1264..1523af4065f 100644 --- a/src/mesa/drivers/dri/savage/savagetex.c +++ b/src/mesa/drivers/dri/savage/savagetex.c @@ -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;