Skip to content

Commit

Permalink
Fixed crash on log out/log in after soft restart
Browse files Browse the repository at this point in the history
  • Loading branch information
NSGolova committed Apr 29, 2024
1 parent 469ec38 commit 6c7da46
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
Binary file modified assets/bl.bundle
Binary file not shown.
2 changes: 2 additions & 0 deletions src/UI/LeaderboardUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ namespace LeaderboardUI {
}

void updatePlayerInfoLabel() {
if (uploadStatus == NULL) return;

auto const& player = PlayerController::currentPlayer;
if (player != std::nullopt) {
if (!player->name.empty()) {
Expand Down
10 changes: 0 additions & 10 deletions src/UI/PreferencesViewController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,6 @@ void BeatLeader::PreferencesViewController::DidActivate(bool firstActivation, bo
});
});

auto capturethis = this;
PlayerController::playerChanged.emplace_back([capturethis](std::optional<Player> const& updated) {
if (!capturethis->isActivated) return;
BSML::MainThreadScheduler::Schedule([updated] {
if (updated) {
UpdateUI(updated);
}
});
});

saveToggle = AddConfigValueToggle(containerTransform, getModConfig().SaveLocalReplays);
starsDropdown = AddConfigValueDropdownEnum(containerTransform, getModConfig().StarValueToShow, starValueOptions);
// // After switching the setting we need to manually call refresh, because StandardLevelDetailView::RefreshContent is not called again,
Expand Down

0 comments on commit 6c7da46

Please sign in to comment.