summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-11-09 15:07:51 +0100
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-11-09 14:23:47 +0000
commit80c92e403f3a167da3e4e3b55c0311a1ff333b0e (patch)
tree62f15bc995416a1121ba951a595933bad0aadff1 /src
parent55d9602f9e6bc51385cc568eac20a95c7181361c (diff)
Fix crash on client exit
Wayland linked lists are implemented by having next and prev pointers in the objects themselves. This means that an object can only be in one list at the time. If the object is not removed from a list before being inserted into another, the original list is corrupted. Change-Id: Idc6cfc507f7d7ff30a365fda01c4f9729335ae09 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index 5cea48a43..42636990f 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -113,6 +113,7 @@ public:
{
destroy_listener.d = this;
destroy_listener.listener.notify = destroy_listener_callback;
+ wl_list_init(&destroy_listener.listener.link);
}
static void destroy_listener_callback(wl_listener *listener, void *data) {
@@ -251,6 +252,7 @@ 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);
}