[second attempt]

Wayland compositor sometimes crashes if you start a client, move the client's 
window, then right-click and drag the empty space.
Not sure if that's the correct solution, but it fixes the crash.

Signed-off-by: Dima Ryazanov <[email protected]>
---
 compositor/compositor.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/compositor/compositor.c b/compositor/compositor.c
index 1e6f2ef..87ea03c 100644
--- a/compositor/compositor.c
+++ b/compositor/compositor.c
@@ -925,10 +925,12 @@ notify_button(struct wl_input_device *device,
                             &surface->surface, device, time,
                             WL_GRAB_RESIZE_BOTTOM_RIGHT);
 
-       device->grab->interface->button(device->grab, time, button, state);
+       if (device->grab) {
+               device->grab->interface->button(device->grab, time, button, 
state);
 
-       if (!state && device->grab && device->grab_button == button)
-               wl_input_device_end_grab(device, time);
+               if (!state && device->grab_button == button)
+                       wl_input_device_end_grab(device, time);
+       }
 }
 
 void
-- 
1.7.1

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

Reply via email to