Merge pull request #2853 from dpayne/fix_use_after_free_on_task_close

pull/2855/head
Alexis Rouillard 2024-01-22 09:01:48 +01:00 committed by GitHub
commit 27fec51439
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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) {