Skip to content

Commit

Permalink
Don't play default sample music when Chart Preview is active
Browse files Browse the repository at this point in the history
lua handles this most of the time
the notefield pointer becomes null when preview is inactive, but also the bool should be false so it would exit before dereferencing null
  • Loading branch information
poco0317 committed Sep 22, 2019
1 parent 2422ec7 commit dd3af14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Etterna/Screen/Others/ScreenSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,10 @@ ScreenSelectMusic::AfterMusicChange()
if (SAMPLE_MUSIC_PREVIEW_MODE !=
SampleMusicPreviewMode_StartToPreview) {
if (!m_sSampleMusicToPlay.empty())
g_bSampleMusicWaiting = true;
// dont run basic preview if chart preview is running
// lua handles that stuff (we need to change that)
g_bSampleMusicWaiting = !(GAMESTATE->m_bIsChartPreviewActive &&
m_pPreviewNoteField->IsVisible());
}
}

Expand Down

0 comments on commit dd3af14

Please sign in to comment.