From f12617deeaf7f2842a49c4a7dcf56f983e06ed7e Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sun, 17 Oct 2021 01:14:01 +0000 Subject: [PATCH] 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 --- src/view.c | 4 ++++ 1 file changed, 4 insertions(+) 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);