diff options
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 8fdebad1940..886e52114f2 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2456,9 +2456,7 @@ teximage(struct gl_context *ctx, GLuint dims, else { gl_format texFormat; - if (texImage->Data) { - ctx->Driver.FreeTextureImageBuffer( ctx, texImage ); - } + ctx->Driver.FreeTextureImageBuffer(ctx, texImage); ASSERT(texImage->Data == NULL); texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, @@ -2597,8 +2595,7 @@ _mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image) if (!texImage) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glEGLImageTargetTexture2D"); } else { - if (texImage->Data) - ctx->Driver.FreeTextureImageBuffer( ctx, texImage ); + ctx->Driver.FreeTextureImageBuffer(ctx, texImage); ASSERT(texImage->Data == NULL); ctx->Driver.EGLImageTargetTexture2D(ctx, target, @@ -3362,9 +3359,7 @@ compressedteximage(struct gl_context *ctx, GLuint dims, else { gl_format texFormat; - if (texImage->Data) { - ctx->Driver.FreeTextureImageBuffer( ctx, texImage ); - } + ctx->Driver.FreeTextureImageBuffer(ctx, texImage); ASSERT(texImage->Data == NULL); texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, |