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