From 439c68b5cfda42a576b3b194a3cd9ae15f905aad Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 31 Aug 2016 23:38:25 -0400 Subject: TITANIC: Add assert to detect what's currently a memory corruption --- engines/titanic/sound/sound_manager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines') diff --git a/engines/titanic/sound/sound_manager.cpp b/engines/titanic/sound/sound_manager.cpp index e23fb1d207..9f3d29e967 100644 --- a/engines/titanic/sound/sound_manager.cpp +++ b/engines/titanic/sound/sound_manager.cpp @@ -272,6 +272,7 @@ void QSoundManager::setVolume(int handle, uint volume, uint seconds) { for (uint idx = 0; idx < _slots.size(); ++idx) { Slot &slot = _slots[idx]; if (slot._handle == handle) { + assert(slot._channel >= 0); _channelsVolume[slot._channel] = volume; updateVolume(slot._channel, seconds * 1000); -- cgit v1.2.3