From 6e6a02261a7c0fcfdf9fbf17199aff4278c8e5b7 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 2 Aug 2007 08:35:13 -0600 Subject: s/MAX_TEXTURE_LEVELS/SIS_MAX_TEXTURE_LEVELS/ and add assertion (bug 11806) --- src/mesa/drivers/dri/sis/sis_tex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/sis/sis_tex.c b/src/mesa/drivers/dri/sis/sis_tex.c index be87f16e298..8fd7b26ba55 100644 --- a/src/mesa/drivers/dri/sis/sis_tex.c +++ b/src/mesa/drivers/dri/sis/sis_tex.c @@ -130,6 +130,8 @@ sisAllocTexImage( sisContextPtr smesa, sisTexObjPtr t, int level, static void sisFreeTexImage( sisContextPtr smesa, sisTexObjPtr t, int level ) { + assert(level >= 0); + assert(level < SIS_MAX_TEXTURE_LEVELS); if (t->image[level].Data == NULL) return; @@ -213,7 +215,7 @@ sisDeleteTexture( GLcontext * ctx, struct gl_texture_object *texObj ) */ return; } - for (i = 0; i < MAX_TEXTURE_LEVELS; i++) { + for (i = 0; i < SIS_MAX_TEXTURE_LEVELS; i++) { sisFreeTexImage( smesa, t, i ); } -- cgit v1.2.3