Remove the input device resource from wayland's list upon destruction.
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Tue, 6 Dec 2011 10:43:32 +0000 (12:43 +0200)
committerJørgen Lind <jorgen.lind@nokia.com>
Tue, 6 Dec 2011 15:20:08 +0000 (16:20 +0100)
Otherwise exiting and starting new apps would sooner or later end
in a compositor crash due to dangling pointers in
input_device->resource_list.

Change-Id: I85ec0f2ffcdc014bf8d714b95772a4d7250d0be5
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
src/qt-compositor/wayland_wrapper/wlinputdevice.cpp

index 0305b65..a7ce0d4 100644 (file)
@@ -144,6 +144,8 @@ void InputDevice::destroy_resource(wl_resource *resource)
 
     input_device->m_data_devices.clear();
 
+    wl_list_remove(&resource->link);
+
     free(resource);
 }