diff options
-rw-r--r-- | engines/gnap/sound.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/gnap/sound.cpp b/engines/gnap/sound.cpp index a4a59d7390..75cfb5555c 100644 --- a/engines/gnap/sound.cpp +++ b/engines/gnap/sound.cpp @@ -57,6 +57,9 @@ void SoundMan::stopSound(int resourceId) { } void SoundMan::setSoundVolume(int resourceId, int volume) { + if (resourceId == -1 || volume < 0 || volume > 100) + return; + const int index = find(resourceId); int realVol = volume * 2.55; _vm->_mixer->setChannelVolume(_items[index]._handle, realVol); |