Skip to content

Commit

Permalink
injector: prevent data race by view.post
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice committed Aug 22, 2022
1 parent 16fc5a1 commit b7af7da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/injector/injector_gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ struct injectee_session_ui : injectee_session {
stream << " via " << *v;
stream << "\n";

log_.set_text(log_.get_text() + stream.str());
view_.post(
[this, str = stream.str()] { log_.set_text(log_.get_text() + str); });
view_.refresh();

co_return;
Expand Down

0 comments on commit b7af7da

Please sign in to comment.