view: do not crash on missing output

We should survive all outputs being disabled
This commit is contained in:
Johan Malm 2022-04-26 21:55:04 +01:00
parent b94f3b1af0
commit 76a85ae87d

View file

@ -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;