diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-06-26 22:51:38 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-26 22:51:38 +1000 |
commit | af0f0375ef9aefb1d53e2058ec2f4cf51ee287a5 (patch) | |
tree | 14be83d7e63450352c85e9723977c5f1001ae3c7 /sway/desktop/output.c | |
parent | 59086fabbfaa545641827b0e181100027de08205 (diff) | |
parent | 6856866a612c9f0708a42cbe6d9627173d9e3569 (diff) | |
download | sway-af0f0375ef9aefb1d53e2058ec2f4cf51ee287a5.tar.xz |
Merge pull request #2163 from martinetd/use-after-free
layer shell: fix some use after free on destroy
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index d4115be8..f0f1603a 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -1199,6 +1199,8 @@ static void damage_handle_destroy(struct wl_listener *listener, void *data) { static void handle_destroy(struct wl_listener *listener, void *data) { struct sway_output *output = wl_container_of(listener, output, destroy); + wl_signal_emit(&output->events.destroy, output); + if (output->swayc) { container_destroy(output->swayc); } @@ -1277,6 +1279,7 @@ void output_enable(struct sway_output *output) { for (size_t i = 0; i < len; ++i) { wl_list_init(&output->layers[i]); } + wl_signal_init(&output->events.destroy); input_manager_configure_xcursor(input_manager); |