st/mesa: Remove unnecessary headers from st_context.c.
[mesa.git] / src / mesa / state_tracker / st_cb_texture.c
index d4630a514f8f2bf1bf4a00d2155c016a69712bfb..cb9106c7de886a6455d4ef740d297893249a61d1 100644 (file)
@@ -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;
    }