From e1955c5c08d4131fd5d3e2a91ec8af05c3117eca Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 20 Aug 2018 10:37:52 +1000 Subject: Fix crash when adding output --- sway/tree/view.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sway/tree/view.c') diff --git a/sway/tree/view.c b/sway/tree/view.c index 4abf1abb..2c0c1aa9 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -889,8 +889,10 @@ void view_add_mark(struct sway_view *view, char *mark) { static void update_marks_texture(struct sway_view *view, struct wlr_texture **texture, struct border_colors *class) { - struct sway_output *output = - view->swayc->outputs->items[view->swayc->outputs->length - 1]; + struct sway_output *output = container_get_effective_output(view->swayc); + if (!output) { + return; + } if (*texture) { wlr_texture_destroy(*texture); *texture = NULL; -- cgit v1.2.3-54-g00ecf