From: Michel Dänzer Date: Mon, 4 Jan 2010 15:54:29 +0000 (+0100) Subject: st/mesa: Only call st_texture_image_unmap() if texImage->Data is non-NULL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e414df894fc70b7024eb38c812e582336014974;p=mesa.git st/mesa: Only call st_texture_image_unmap() if texImage->Data is non-NULL. This was already done in st_TexImage() but was missed between incremental changes to st_TexSubimage(). --- diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index d4630a514f8..cb9106c7de8 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1090,7 +1090,7 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level, done: _mesa_unmap_teximage_pbo(ctx, packing); - if (stImage->pt) { + if (stImage->pt && texImage->Data) { st_texture_image_unmap(ctx->st, stImage); texImage->Data = NULL; }