From: Vinson Lee Date: Sun, 28 Feb 2010 00:30:49 +0000 (-0800) Subject: mga: Add assert to check for null pointer dereference. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=689249bcbe96e2655aac29569ba36554bee1c503;p=mesa.git mga: Add assert to check for null pointer dereference. --- diff --git a/src/mesa/drivers/dri/mga/mgatexmem.c b/src/mesa/drivers/dri/mga/mgatexmem.c index 47be6f3c185..58afbbb279e 100644 --- a/src/mesa/drivers/dri/mga/mgatexmem.c +++ b/src/mesa/drivers/dri/mga/mgatexmem.c @@ -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;