Fix use after free on task close

pull/2853/head
dpayne 2024-01-21 19:08:23 -08:00
parent 6e12f81223
commit 53233e47a3
1 changed files with 1 additions and 1 deletions

View File

@ -527,11 +527,11 @@ void Task::handle_closed() {
spdlog::debug("{} closed", repr());
zwlr_foreign_toplevel_handle_v1_destroy(handle_);
handle_ = nullptr;
tbar_->remove_task(id_);
if (button_visible_) {
tbar_->remove_button(button);
button_visible_ = false;
}
tbar_->remove_task(id_);
}
bool Task::handle_clicked(GdkEventButton *bt) {