From 9190735947947f5afa21f725cfe0569abde946aa Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 13 Oct 2018 19:15:04 +1000 Subject: Fix crash when view maps while locked When locked, there is no active workspace so it must find the focus_inactive workspace instead. Additionally, this adds a check for if a view maps while there are no outputs connected and handles it gracefully. --- sway/tree/arrange.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sway/tree/arrange.c') diff --git a/sway/tree/arrange.c b/sway/tree/arrange.c index 373460a2..852d53bf 100644 --- a/sway/tree/arrange.c +++ b/sway/tree/arrange.c @@ -180,6 +180,10 @@ void arrange_workspace(struct sway_workspace *workspace) { if (config->reloading) { return; } + if (!workspace->output) { + // Happens when there are no outputs connected + return; + } struct sway_output *output = workspace->output; struct wlr_box *area = &output->usable_area; wlr_log(WLR_DEBUG, "Usable area for ws: %dx%d@%d,%d", -- cgit v1.2.3