Skip to content

Commit 8993e9d

Browse files
authored
Made crash in DynamicSongSection at least assert first
1 parent 18b8894 commit 8993e9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Entities/DynamicSong.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,13 @@ SoundContainer& DynamicSongSection::SelectTransitionSoundContainer() {
162162
}
163163
}
164164

165+
RTEAssert(!m_TransitionSoundContainers.empty(), "Tried to get a transition SoundContainer from a DynamicSongSection with none to choose from!");
165166
return m_TransitionSoundContainers[0];
166167
}
167168

168169
SoundContainer& DynamicSongSection::SelectSoundContainer() {
169170
// Shuffle between our options if we have multiple
170-
if (m_SoundContainers.size() != 1) {
171+
if (m_SoundContainers.size() > 1) {
171172
if (m_ShuffleUnplayedIndices.empty()) {
172173
for (unsigned int i = 0; i < m_SoundContainers.size(); i++) {
173174
if (i != m_LastSoundContainerIndex) {

0 commit comments

Comments
 (0)