Skip to content

Commit

Permalink
Add checkpoint to Soundman position setter
Browse files Browse the repository at this point in the history
just in case this causes a crash down the line
  • Loading branch information
poco0317 committed Sep 22, 2019
1 parent 5468cc6 commit 2422ec7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Etterna/Singletons/GameSoundManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,11 @@ GameSoundManager::HandleSetPosition()
vector<SoundPositionSetter> vec = g_PositionsToSet;
g_PositionsToSet.clear();
g_Mutex->Unlock();
if (!vec.empty()) {
for (unsigned i = 0; i < vec.size(); i++) {
vec[i].m_psound->SetPositionSeconds(vec[i].fSeconds);
}
for (unsigned i = 0; i < vec.size(); i++) {
// I wonder if this can crash when sounds get deleted
// only one way to find out - checkpoint and see if someone crashes :)
CHECKPOINT_M("Setting position for sound.");
vec[i].m_psound->SetPositionSeconds(vec[i].fSeconds);
}
}

Expand Down

0 comments on commit 2422ec7

Please sign in to comment.