From: Vinson Lee Date: Sun, 28 Feb 2010 00:41:49 +0000 (-0800) Subject: i810: Add assert to check for null pointer dereference. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=975f105bb88fe6c146c091556f142e733885c91a;p=mesa.git i810: Add assert to check for null pointer dereference. --- 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;