aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/sound.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2009-10-10 04:15:38 +0000
committerPaul Gilbert2009-10-10 04:15:38 +0000
commitdf3fbd432de3d0bfc8ec689a5616b34103c63791 (patch)
tree4dea186e6dabb0463adf7f64d8eeedd5c8ff7219 /engines/cruise/sound.cpp
parent6c1cac39567bf6867274c1bb0c93feef72d535c6 (diff)
downloadscummvm-rg350-df3fbd432de3d0bfc8ec689a5616b34103c63791.tar.gz
scummvm-rg350-df3fbd432de3d0bfc8ec689a5616b34103c63791.tar.bz2
scummvm-rg350-df3fbd432de3d0bfc8ec689a5616b34103c63791.zip
Further memory leak fixes
svn-id: r44861
Diffstat (limited to 'engines/cruise/sound.cpp')
-rw-r--r--engines/cruise/sound.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index 811cbd4523..4985dd3ef8 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -601,9 +601,7 @@ PCSoundFxPlayer::PCSoundFxPlayer(PCSoundDriver *driver)
PCSoundFxPlayer::~PCSoundFxPlayer() {
_driver->setUpdateCallback(NULL, NULL);
- if (_playing) {
- stop();
- }
+ stop();
}
bool PCSoundFxPlayer::load(const char *song) {
@@ -674,8 +672,8 @@ void PCSoundFxPlayer::stop() {
_driver->stopChannel(i);
}
_driver->stopAll();
- unload();
}
+ unload();
}
void PCSoundFxPlayer::fadeOut() {