Skip to content

Commit

Permalink
Fix use after free on task close
Browse files Browse the repository at this point in the history
  • Loading branch information
dpayne committed Jan 22, 2024
1 parent 6e12f81 commit 53233e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/wlr/taskbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 53233e4

Please sign in to comment.