summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-02-27 16:38:09 -0800
committerVinson Lee <vlee@vmware.com>2010-02-27 16:38:09 -0800
commitb45af1ec61473ad3a576fc0cb564a4f71fbab7f5 (patch)
treedb2144cb4a588e145f32a06aa1e4dac8729eb4be /src
parent689249bcbe96e2655aac29569ba36554bee1c503 (diff)
mach64: Add asserts to check for null pointer dereferences.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_texmem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_texmem.c b/src/mesa/drivers/dri/mach64/mach64_texmem.c
index 46cee4320d..b09954ce23 100644
--- a/src/mesa/drivers/dri/mach64/mach64_texmem.c
+++ b/src/mesa/drivers/dri/mach64/mach64_texmem.c
@@ -305,6 +305,7 @@ void mach64UploadTexImages( mach64ContextPtr mmesa, mach64TexObjPtr t )
t->heap = heap;
/* Set the base offset of the texture image */
+ assert(t->base.memBlock);
t->bufAddr = mmesa->mach64Screen->texOffset[heap] + t->base.memBlock->ofs;
/* Force loading the new state into the hardware */
@@ -457,7 +458,9 @@ void mach64UploadMultiTexImages( mach64ContextPtr mmesa,
}
/* Set the base offset of the texture image */
+ assert(t0->base.memBlock);
t0->bufAddr = mmesa->mach64Screen->texOffset[heap] + t0->base.memBlock->ofs;
+ assert(t1->base.memBlock);
t1->bufAddr = mmesa->mach64Screen->texOffset[heap] + t1->base.memBlock->ofs;
/* Force loading the new state into the hardware */