From 76a85ae87dda7567f34aad8820865ac465c783f2 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Tue, 26 Apr 2022 21:55:04 +0100 Subject: [PATCH] view: do not crash on missing output We should survive all outputs being disabled --- src/view.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/view.c b/src/view.c index 22e03531..2d2977c8 100644 --- a/src/view.c +++ b/src/view.c @@ -141,7 +141,9 @@ static bool view_compute_centered_position(struct view *view, int w, int h, int *x, int *y) { struct output *output = view_output(view); - assert(output); + if (!output) { + return false; + } struct wlr_output *wlr_output = output->wlr_output; if (!wlr_output) { return false; -- 2.52.0