From 689249bcbe96e2655aac29569ba36554bee1c503 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 27 Feb 2010 16:30:49 -0800 Subject: mga: Add assert to check for null pointer dereference. --- src/mesa/drivers/dri/mga/mgatexmem.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/drivers/dri/mga') diff --git a/src/mesa/drivers/dri/mga/mgatexmem.c b/src/mesa/drivers/dri/mga/mgatexmem.c index 47be6f3c18..58afbbb279 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; -- cgit v1.2.3