diff options
author | Brian Paul <[email protected]> | 2001-05-02 21:04:08 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-05-02 21:04:08 +0000 |
commit | fe5cb830b19b4a74b3a88a9f3984bdcb2cae99a1 (patch) | |
tree | adac7fb1251969e159e7f3893a19070e95b2e9b0 /src/mesa/drivers/glide/fxtexman.c | |
parent | 104c9fde4edc43c28dcc577d542683c8bbca6783 (diff) |
teximage updates. seems to work fine.
Diffstat (limited to 'src/mesa/drivers/glide/fxtexman.c')
-rw-r--r-- | src/mesa/drivers/glide/fxtexman.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/mesa/drivers/glide/fxtexman.c b/src/mesa/drivers/glide/fxtexman.c index 2e989a04b41..99691ce2af9 100644 --- a/src/mesa/drivers/glide/fxtexman.c +++ b/src/mesa/drivers/glide/fxtexman.c @@ -499,6 +499,9 @@ fxTMReloadMipMapLevel(fxMesaContext fxMesa, struct gl_texture_object *tObj, tfxMipMapLevel *mml = FX_MIPMAP_DATA(texImage); assert(mml); + assert(mml->width > 0); + assert(mml->height > 0); + assert(mml->glideFormat > 0); if (!ti->validated) { fprintf(stderr, @@ -714,13 +717,15 @@ fxTMFreeTexture(fxMesaContext fxMesa, struct gl_texture_object *tObj) for (i = 0; i < MAX_TEXTURE_LEVELS; i++) { struct gl_texture_image *texImage = tObj->Image[i]; - if (texImage->Data) { - FREE(texImage->Data); - texImage->Data = NULL; - } - if (texImage->DriverData) { - FREE(texImage->DriverData); - texImage->DriverData = NULL; + if (texImage) { + if (texImage->Data) { + FREE(texImage->Data); + texImage->Data = NULL; + } + if (texImage->DriverData) { + FREE(texImage->DriverData); + texImage->DriverData = NULL; + } } } switch (ti->whichTMU) { |