don't crash if SoundMgr is given an invalid index (happens if entities dont define a soundGroup - we need to find a way to prevent the underlying cause.
fixes #203, see also http://www.wildfiregames.com/forum/index.php?showtopic=11703 This was SVN commit r6132.
This commit is contained in:
parent
f07b780f5f
commit
4d61367fd7
@ -140,5 +140,8 @@ void CSoundGroupMgr::UpdateSoundGroups(float TimeSinceLastFrame)
|
||||
///////////////////////////////////////////
|
||||
void CSoundGroupMgr::PlayNext(size_t index, const CVector3D& position)
|
||||
{
|
||||
m_Groups[index]->PlayNext(position);
|
||||
if(index < m_Groups.size())
|
||||
m_Groups[index]->PlayNext(position);
|
||||
else
|
||||
debug_printf("SND: PlayNext(%d) invalid, %d groups defined\n", index, m_Groups.size());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user