Skip to content

Commit

Permalink
fix: added assert to UiBridge::call
Browse files Browse the repository at this point in the history
  • Loading branch information
cEvolve05 committed Aug 12, 2024
1 parent bfc4ad5 commit a9a3898
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Controller/UiBridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ bool UiBridge::inEventLoop() const {
}

void UiBridge::call(Action& action) {
slint::private_api::assert_main_thread();
std::for_each(views.begin(),
views.end(),
[&action](const std::pair<const ViewName, std::shared_ptr<BasicView>>& view) {
Expand All @@ -103,6 +104,7 @@ void UiBridge::call(Action& action) {
}

void UiBridge::call(Action& action, ViewName target) {
slint::private_api::assert_main_thread();
action(*views.at(target));
}

Expand Down

0 comments on commit a9a3898

Please sign in to comment.