diff options
author | 2018-08-20 10:37:52 +1000 | |
---|---|---|
committer | 2018-08-20 10:37:52 +1000 | |
commit | e1955c5c08d4131fd5d3e2a91ec8af05c3117eca (patch) | |
tree | 34ada4f6dfb4362aa37e6221f01a0561cc43a569 /sway/tree/view.c | |
parent | Clean up tracked outputs when an output is destroyed (diff) | |
download | sway-e1955c5c08d4131fd5d3e2a91ec8af05c3117eca.tar.gz sway-e1955c5c08d4131fd5d3e2a91ec8af05c3117eca.tar.zst sway-e1955c5c08d4131fd5d3e2a91ec8af05c3117eca.zip |
Fix crash when adding output
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) { | |||
889 | 889 | ||
890 | static void update_marks_texture(struct sway_view *view, | 890 | static void update_marks_texture(struct sway_view *view, |
891 | struct wlr_texture **texture, struct border_colors *class) { | 891 | struct wlr_texture **texture, struct border_colors *class) { |
892 | struct sway_output *output = | 892 | struct sway_output *output = container_get_effective_output(view->swayc); |
893 | view->swayc->outputs->items[view->swayc->outputs->length - 1]; | 893 | if (!output) { |
894 | return; | ||
895 | } | ||
894 | if (*texture) { | 896 | if (*texture) { |
895 | wlr_texture_destroy(*texture); | 897 | wlr_texture_destroy(*texture); |
896 | *texture = NULL; | 898 | *texture = NULL; |