<div>Hi everyone,</div><div><br></div><div>This is my first attempt at fixing a Wayland bug, as well as my first time using Git. Hopefully, I'm doing it right :)</div><div><br></div><div>Wayland compositor sometimes crashes if you start a client, move the client's window, then right-click and drag the empty space.</div>
<div>Not sure if that's the correct solution, but it fixes the crash.</div><div><br></div><div>Signed-off-by: Dima Ryazanov <<a href="mailto:dima@gmail.com">dima@gmail.com</a>></div><div>---</div><div> compositor/compositor.c | 8 +++++---</div>
<div> 1 files changed, 5 insertions(+), 3 deletions(-)</div><div><br></div><div>diff --git a/compositor/compositor.c b/compositor/compositor.c</div><div>index 1e6f2ef..87ea03c 100644</div><div>--- a/compositor/compositor.c</div>
<div>+++ b/compositor/compositor.c</div><div>@@ -925,10 +925,12 @@ notify_button(struct wl_input_device *device,</div><div> &surface->surface, device, time,</div><div> WL_GRAB_RESIZE_BOTTOM_RIGHT);</div>
<div> </div><div>- device->grab->interface->button(device->grab, time, button, state);</div><div>+ if (device->grab) {</div><div>+ device->grab->interface->button(device->grab, time, button, state);</div>
<div> </div><div>- if (!state && device->grab && device->grab_button == button)</div><div>- wl_input_device_end_grab(device, time);</div><div>+ if (!state && device->grab_button == button)</div>
<div>+ wl_input_device_end_grab(device, time);</div><div>+ }</div><div> }</div><div> </div><div> void</div><div>-- </div><div>1.7.1</div><div><br></div>