diff options
author | David Turner | 2010-12-31 09:07:44 +0000 |
---|---|---|
committer | David Turner | 2010-12-31 09:07:44 +0000 |
commit | c9330fb79eb5703aa3fccfe31a4631209ceecbc0 (patch) | |
tree | 97e79529cf8866c3bcdf60da52079a6b1782ff79 | |
parent | 9f9035c3df7aa4accec62cbb72c54dc680eb68f9 (diff) | |
download | scummvm-rg350-c9330fb79eb5703aa3fccfe31a4631209ceecbc0.tar.gz scummvm-rg350-c9330fb79eb5703aa3fccfe31a4631209ceecbc0.tar.bz2 scummvm-rg350-c9330fb79eb5703aa3fccfe31a4631209ceecbc0.zip |
CINE: Close Memory Leak in PCSoundFxPlayer.
This leakage was reported by Valgrind while playing Operation Stealth.
svn-id: r55070
-rw-r--r-- | engines/cine/sound.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/cine/sound.cpp b/engines/cine/sound.cpp index a736f3d625..23e9db9670 100644 --- a/engines/cine/sound.cpp +++ b/engines/cine/sound.cpp @@ -575,9 +575,7 @@ PCSoundFxPlayer::PCSoundFxPlayer(PCSoundDriver *driver) PCSoundFxPlayer::~PCSoundFxPlayer() { _driver->setUpdateCallback(NULL, NULL); - if (_playing) { - stop(); - } + stop(); } bool PCSoundFxPlayer::load(const char *song) { @@ -589,9 +587,7 @@ bool PCSoundFxPlayer::load(const char *song) { } _fadeOutCounter = 0; - if (_playing) { - stop(); - } + stop(); _sfxData = readBundleSoundFile(song); if (!_sfxData) { |