Skip to content

Commit 8cdb2cc

Browse files
authored
Merge branch 'development' into musicman-use-after-free
2 parents b0c5876 + 8993e9d commit 8cdb2cc

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,14 +162,15 @@ 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
RTEAssert(!m_SoundContainers.empty(), "Tried to get a SoundContainer from a DynamicSongSection with none to choose from!");
170171

171172
// Shuffle between our options if we have multiple
172-
if (m_SoundContainers.size() != 1) {
173+
if (m_SoundContainers.size() > 1) {
173174
if (m_ShuffleUnplayedIndices.empty()) {
174175
for (unsigned int i = 0; i < m_SoundContainers.size(); i++) {
175176
if (i != m_LastSoundContainerIndex) {

0 commit comments

Comments
 (0)