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)
This commit is contained in:
Alexander Orzechowski 2022-10-14 14:30:44 -04:00 committed by Kirill Primak
parent 9560a7eefd
commit c07424411a

View file

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