diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 3f82b5c2..15ea3223 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -1360,7 +1360,7 @@ touch_move_grab_motion(struct weston_touch_grab *grab, int dx = wl_fixed_to_int(grab->touch->grab_x + move->dx); int dy = wl_fixed_to_int(grab->touch->grab_y + move->dy); - if (!shsurf || !move->active) + if (!shsurf || !shsurf->desktop_surface || !move->active) return; es = weston_desktop_surface_get_surface(shsurf->desktop_surface); @@ -1492,7 +1492,7 @@ move_grab_motion(struct weston_pointer_grab *grab, int cx, cy; weston_pointer_move(pointer, event); - if (!shsurf) + if (!shsurf || !shsurf->desktop_surface) return; surface = weston_desktop_surface_get_surface(shsurf->desktop_surface);