aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast/s_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/swrast/s_texture.c')
-rw-r--r--mesalib/src/mesa/swrast/s_texture.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mesalib/src/mesa/swrast/s_texture.c b/mesalib/src/mesa/swrast/s_texture.c
index 27803c553..c08a4e9d1 100644
--- a/mesalib/src/mesa/swrast/s_texture.c
+++ b/mesalib/src/mesa/swrast/s_texture.c
@@ -164,10 +164,9 @@ _swrast_free_texture_image_buffer(struct gl_context *ctx,
struct gl_texture_image *texImage)
{
struct swrast_texture_image *swImage = swrast_texture_image(texImage);
- if (swImage->Buffer) {
- _mesa_align_free(swImage->Buffer);
- swImage->Buffer = NULL;
- }
+
+ _mesa_align_free(swImage->Buffer);
+ swImage->Buffer = NULL;
free(swImage->ImageSlices);
swImage->ImageSlices = NULL;