<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&#39;m doing it right :)</div><div><br></div><div>Wayland compositor sometimes crashes if you start a client, move the client&#39;s window, then right-click and drag the empty space.</div>
<div>Not sure if that&#39;s the correct solution, but it fixes the crash.</div><div><br></div><div>Signed-off-by: Dima Ryazanov &lt;<a href="mailto:dima@gmail.com">dima@gmail.com</a>&gt;</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>                             &amp;surface-&gt;surface, device, time,</div><div>                             WL_GRAB_RESIZE_BOTTOM_RIGHT);</div>
<div> </div><div>-       device-&gt;grab-&gt;interface-&gt;button(device-&gt;grab, time, button, state);</div><div>+       if (device-&gt;grab) {</div><div>+               device-&gt;grab-&gt;interface-&gt;button(device-&gt;grab, time, button, state);</div>
<div> </div><div>-       if (!state &amp;&amp; device-&gt;grab &amp;&amp; device-&gt;grab_button == button)</div><div>-               wl_input_device_end_grab(device, time);</div><div>+               if (!state &amp;&amp; device-&gt;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>