Hi,

This is a trivial fix for SIGSEGV described in https://bugs.freedesktop.org/show_bug.cgi?id=79725 occurring due to null pointer dereference. Currently I do not have enough knowledge about the protocol itself to be certain if this is not a deeper bug down the line requiring an assertion here and more involved fix deeper in the input handling. I would be glad to investigate this issue further if it is in fact the case.

Best regards,

---
 src/data-device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/data-device.c b/src/data-device.c
index 6a81bc8..87aa902 100644
--- a/src/data-device.c
+++ b/src/data-device.c
@@ -654,7 +654,8 @@ data_device_start_drag(struct wl_client *client, struct wl_resource *resource,
         seat->pointer->grab_serial != serial ||
         !seat->pointer->focus ||
seat->pointer->focus->surface != wl_resource_get_user_data(origin_resource)) &&
-        (seat->touch->grab_serial != serial ||
+        (!seat->touch ||
+            seat->touch->grab_serial != serial ||
         !seat->touch->focus ||
seat->touch->focus->surface != wl_resource_get_user_data(origin_resource)))
         return;
--
1.8.3.2

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to