aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/output.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-01-10 09:20:07 +0100
committerGitHub <noreply@github.com>2019-01-10 09:20:07 +0100
commit9abac85888da4b57a2cc708017318fee100e8b16 (patch)
treeccb41e3a18bc480b3fb9dd706285f96eefd82d80 /sway/tree/output.c
parentd0b9701820bd92e008e73693d5e61d672372e7e1 (diff)
parent8fd3f32c79c4784d846e05f5d9b4f284cd10ae2e (diff)
Merge pull request #3399 from RedSoxFan/fix-output-destruction-segfaults
Fix segfaults on output destruction
Diffstat (limited to 'sway/tree/output.c')
-rw-r--r--sway/tree/output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/tree/output.c b/sway/tree/output.c
index 95ab9378..f24be010 100644
--- a/sway/tree/output.c
+++ b/sway/tree/output.c
@@ -58,6 +58,7 @@ struct sway_output *output_create(struct wlr_output *wlr_output) {
wlr_output->data = output;
wl_signal_add(&wlr_output->events.destroy, &output->destroy);
+ wl_signal_init(&output->events.destroy);
wl_list_insert(&root->all_outputs, &output->link);
@@ -76,7 +77,6 @@ void output_enable(struct sway_output *output, struct output_config *oc) {
for (size_t i = 0; i < len; ++i) {
wl_list_init(&output->layers[i]);
}
- wl_signal_init(&output->events.destroy);
output->enabled = true;
list_add(root->outputs, output);