summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxtexman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/glide/fxtexman.c')
-rw-r--r--src/mesa/drivers/glide/fxtexman.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/glide/fxtexman.c b/src/mesa/drivers/glide/fxtexman.c
index 87f309adc35..bc20fa10bce 100644
--- a/src/mesa/drivers/glide/fxtexman.c
+++ b/src/mesa/drivers/glide/fxtexman.c
@@ -651,12 +651,11 @@ void fxTMFreeTexture(fxMesaContext fxMesa, struct gl_texture_object *tObj)
fxTMMoveOutTM(fxMesa, tObj);
- for(i=0; i<MAX_TEXTURE_LEVELS; i++) {
- if (ti->mipmapLevel[i].used &&
- ti->mipmapLevel[i].translated)
+ for (i=0; i<MAX_TEXTURE_LEVELS; i++) {
+ if (ti->mipmapLevel[i].data) {
FREE(ti->mipmapLevel[i].data);
-
- (void)ti->mipmapLevel[i].data;
+ ti->mipmapLevel[i].data = NULL;
+ }
}
switch (ti->whichTMU) {
case FX_TMU0: