st/mesa: set compressed_data to NULL when freed
[mesa.git] / src / mesa / state_tracker / st_cb_texture.c
index 72274579187acbd764f949751d8f9ef40c3aa1da..b0ea844c0711fd140d2e6ffed9fff4e48816aa1e 100644 (file)
@@ -235,6 +235,7 @@ st_FreeTextureImageBuffer(struct gl_context *ctx,
        pipe_reference(&stImage->compressed_data->reference, NULL)) {
       free(stImage->compressed_data->ptr);
       free(stImage->compressed_data);
+      stImage->compressed_data = NULL;
    }
 
    /* if the texture image is being deallocated, the structure of the