Skip to content

Commit b0c5876

Browse files
committed
also move assert up just in case
1 parent 9a6d28f commit b0c5876

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/Entities/DynamicSong.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ SoundContainer& DynamicSongSection::SelectTransitionSoundContainer() {
166166
}
167167

168168
SoundContainer& DynamicSongSection::SelectSoundContainer() {
169+
RTEAssert(!m_SoundContainers.empty(), "Tried to get a SoundContainer from a DynamicSongSection with none to choose from!");
170+
169171
// Shuffle between our options if we have multiple
170172
if (m_SoundContainers.size() != 1) {
171173
if (m_ShuffleUnplayedIndices.empty()) {
@@ -198,8 +200,7 @@ SoundContainer& DynamicSongSection::SelectSoundContainer() {
198200
}
199201
}
200202
}
201-
202-
RTEAssert(!m_SoundContainers.empty(), "Tried to get a SoundContainer from a DynamicSongSection with none to choose from!");
203+
203204
return m_SoundContainers[0];
204205
}
205206

0 commit comments

Comments
 (0)