Skip to content

Commit

Permalink
prevent reloading wheel after diff reload if exiting anyways
Browse files Browse the repository at this point in the history
this stops a crash in rebirth
  • Loading branch information
poco0317 committed Feb 28, 2023
1 parent 71991a7 commit 40f0550
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Themes/Rebirth/Scripts/11 Wheel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,9 @@ function MusicWheel:new(params)
end

w.ReloadFilteredSongsCommand = function(self, params)
-- this stops things like the diff reload from killing the game
if enteringSong then return end

local newItems = WHEELDATA:GetFilteredFolders()
WHEELDATA:SetWheelItems(newItems)

Expand Down
6 changes: 5 additions & 1 deletion src/Etterna/Screen/Others/ScreenSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,11 @@ void
ScreenSelectMusic::DifferentialReload()
{
// reload songs
SONGMAN->DifferentialReload();
SONGMAN->DifferentialReload();

if (IsTransitioning() || m_SelectionState == SelectionState_Finalized) {
return;
}

const auto selSong = GAMESTATE->m_pCurSong;
const auto currentHoveredGroup = m_MusicWheel.GetCurrentGroup();
Expand Down

0 comments on commit 40f0550

Please sign in to comment.