Skip to content

Commit

Permalink
Fixed crash on soft restart
Browse files Browse the repository at this point in the history
  • Loading branch information
NSGolova committed Apr 24, 2024
1 parent 06e1e09 commit f31e0e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/UI/CaptorClanUI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ namespace CaptorClanUI {
void initCaptorClan(UnityEngine::GameObject* header, TMPro::TextMeshProUGUI* headerPanelText);
void setClan(ClanRankingStatus clanStatus);
void setActive(bool active);
void Reset();
}
4 changes: 4 additions & 0 deletions src/UI/CaptorClanUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,8 @@ namespace CaptorClanUI {
setClan(lastStatus);
}
}

void Reset() {
mainPanel = NULL;
}
}
2 changes: 2 additions & 0 deletions src/UI/LeaderboardUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,7 @@ namespace LeaderboardUI {
linkContainer = NULL;
settingsContainer = NULL;
contextsContainer = NULL;
loginPrompt = NULL;
preferencesButton = NULL;
parentScreen = NULL;
sspageUpButton = NULL;
Expand All @@ -1357,6 +1358,7 @@ namespace LeaderboardUI {
cellBackgrounds = {};
showBeatLeaderButton = NULL;
upPageButton = NULL;
CaptorClanUI::Reset();
ssWasOpened = false;
if (ssInstalled) {
showBeatLeader = getModConfig().ShowBeatleader.GetValue();
Expand Down

0 comments on commit f31e0e8

Please sign in to comment.