Skip to content

Commit

Permalink
Fix crash at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Dec 30, 2023
1 parent 3e9ba5e commit 9bb44d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/state/editor_screen/upgrade_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ impl Plugin for UpgradePanelPlugin {
.and_then(state_changed::<AppState>().or_else(on_event::<UpgradeEvent>())),
),
)
.add_systems(Update, update_upgrade_button_disabled.in_set(AppSet::End));
.add_systems(
Update,
update_upgrade_button_disabled
.in_set(AppSet::End)
.run_if(in_state(AppState::EditorScreen)),
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Plugin for UpgradePlugin {
.add_systems(
Update,
(
process_new_installed_upgrades,
process_new_installed_upgrades.run_if(on_event::<UpgradeEvent>()),
install_upgrades.run_if(on_event::<UpgradeEvent>()),
run_installed_upgrades,
apply_deferred,
Expand Down

0 comments on commit 9bb44d5

Please sign in to comment.