wlr_scene: Destroy the texture when setting a new buffer.

Fixes: https://github.com/labwc/labwc/issues/587
Fixes: f0e31e806f (wlr_scene: Fix not updating the scene node when setting a new buffer)
Alexander Orzechowski 2 years ago committed by Kirill Primak
parent 9560a7eefd
commit c07424411a

@ -566,6 +566,9 @@ void wlr_scene_buffer_set_buffer_with_damage(struct wlr_scene_buffer *scene_buff
bool update = false; bool update = false;
wlr_buffer_unlock(scene_buffer->buffer); wlr_buffer_unlock(scene_buffer->buffer);
wlr_texture_destroy(scene_buffer->texture);
scene_buffer->texture = NULL;
if (buffer) { if (buffer) {
// if this node used to not be mapped or its previous displayed // if this node used to not be mapped or its previous displayed
// buffer region will be different from what the new buffer would // buffer region will be different from what the new buffer would

Loading…
Cancel
Save