From 1e414df894fc70b7024eb38c812e582336014974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 4 Jan 2010 16:54:29 +0100 Subject: 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(). --- src/mesa/state_tracker/st_cb_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index d4630a514f..cb9106c7de 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; } -- cgit v1.2.3