Skip to content
Snippets Groups Projects
Commit 93ca929f authored by Laszlo Agocs's avatar Laszlo Agocs
Browse files

Fix destroy listener signal connection


Remove it from the list in the callback, not when a new buffer
is created later on.

Change-Id: I2328edec9728752d18efaecede19eb4527d0f578
Reviewed-by: default avatarLouai Al-Khanji <louai.al-khanji@theqtcompany.com>
parent 5da1fd65
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,7 @@ public:
buffer_destroy_listener *destroy_listener = reinterpret_cast<buffer_destroy_listener *>(listener);
WaylandEglClientBufferIntegrationPrivate *self = destroy_listener->d;
struct ::wl_resource *buffer = static_cast<struct ::wl_resource *>(data);
wl_list_remove(&listener->link);
if (!self->buffers.contains(buffer))
return;
......@@ -256,7 +257,6 @@ void WaylandEglClientBufferIntegration::initializeBuffer(struct ::wl_resource *b
if (!buffer || d->buffers.contains(buffer))
return;
wl_list_remove(&d->destroy_listener.listener.link);
wl_signal_add(&buffer->destroy_signal, &d->destroy_listener.listener);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment