From: Joshua Ashton Date: Sun, 17 Oct 2021 01:14:01 +0000 (+0000) Subject: action: Fix crash in move to edge X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=f12617deeaf7f2842a49c4a7dcf56f983e06ed7e;p=proto%2Flabwc.git action: Fix crash in move to edge Fixes a crash in move to edge ( #77 ) when the centre of the window is out of any display regions. Doesn't fix the expected behaviour that it would work, but much better than the whole compositor dying. Signed-off-by: Joshua Ashton --- diff --git a/src/view.c b/src/view.c index a35f5b2e..011b69d6 100644 --- a/src/view.c +++ b/src/view.c @@ -212,6 +212,10 @@ view_move_to_edge(struct view *view, const char *direction) return; } struct output *output = view_output(view); + if (!output) { + wlr_log(WLR_ERROR, "no output"); + return; + } struct border border = view_border(view); struct wlr_box usable = output_usable_area_in_layout_coords(output);