From 975f105bb88fe6c146c091556f142e733885c91a Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 27 Feb 2010 16:41:49 -0800 Subject: [PATCH] i810: Add assert to check for null pointer dereference. --- src/mesa/drivers/dri/i810/i810texmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i810/i810texmem.c b/src/mesa/drivers/dri/i810/i810texmem.c index bb426a41122..6e6b21cf2b9 100644 --- a/src/mesa/drivers/dri/i810/i810texmem.c +++ b/src/mesa/drivers/dri/i810/i810texmem.c @@ -155,6 +155,7 @@ int i810UploadTexImagesLocked( i810ContextPtr imesa, i810TextureObjectPtr t ) return -1; } + assert(t->base.memBlock); ofs = t->base.memBlock->ofs; t->BufAddr = imesa->i810Screen->tex.map + ofs; t->Setup[I810_TEXREG_MI3] = imesa->i810Screen->textureOffset + ofs; -- 2.30.2