summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-02-03 13:31:38 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-02-04 11:09:18 +0000
commit93ca929fb9caf34715012dec608afd42e6ccf1e5 (patch)
treef6be7dcc0fe5e52d57bcfaf79efe34b6d3f775e2
parent5da1fd65b2879fb41b7c25d4ff849272f817f668 (diff)
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: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index fc2d145f5..2413df915 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -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);
}