aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-22 21:07:54 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-22 21:07:54 -0400
commit0e7d13fab7f23658a85df58ad26c6c77c9638bff (patch)
treed5fcddc15e07b7a9f4907e3240aeaa61d8e11e04
parentd1dd0a6970649d9f2c0eeed30da0eff745f16dd1 (diff)
wlr-surface: destroy texture on null buffer commit
-rw-r--r--types/wlr_surface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c
index 79905fae..f8689d8e 100644
--- a/types/wlr_surface.c
+++ b/types/wlr_surface.c
@@ -406,7 +406,8 @@ static void wlr_surface_commit_pending(struct wlr_surface *surface) {
wlr_surface_move_state(surface, surface->pending, surface->current);
if (null_buffer_commit) {
- surface->texture->valid = false;
+ wlr_texture_destroy(surface->texture);
+ surface->texture = NULL;
}
bool reupload_buffer = oldw != surface->current->buffer_width ||