aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush/smush_player.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-07-19 17:04:16 +0000
committerTorbjörn Andersson2005-07-19 17:04:16 +0000
commit3d4192de8843b2db90258f912e3b31030fa063ef (patch)
tree2de7561e6340db0afa1fb21ce479fce51ba8e07c /scumm/smush/smush_player.cpp
parentba275dfd58a13a86d2ba9b9583ebe6c96199d29a (diff)
downloadscummvm-rg350-3d4192de8843b2db90258f912e3b31030fa063ef.tar.gz
scummvm-rg350-3d4192de8843b2db90258f912e3b31030fa063ef.tar.bz2
scummvm-rg350-3d4192de8843b2db90258f912e3b31030fa063ef.zip
No need to test if a pointer is NULL before freeing it. And since I
couldn't see _frameBuffer being freed anywhere, I added that as well, though I'm not sure when it's allocated. svn-id: r18557
Diffstat (limited to 'scumm/smush/smush_player.cpp')
-rw-r--r--scumm/smush/smush_player.cpp36
1 files changed, 16 insertions, 20 deletions
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index 4da332f2fb..68d36c71f2 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -300,31 +300,27 @@ void SmushPlayer::release() {
_vm->_smushVideoShouldFinish = true;
for (int i = 0; i < 5; i++) {
- if (_sf[i]) {
- delete _sf[i];
- _sf[i] = NULL;
- }
+ delete _sf[i];
+ _sf[i] = NULL;
}
- if (_strings) {
- delete _strings;
- _strings = NULL;
- }
+ delete _strings;
+ _strings = NULL;
- if (_smixer) {
+ if (_smixer)
_smixer->stop();
- delete _smixer;
- _smixer = NULL;
- }
- if (_base) {
- delete _base;
- _base = NULL;
- }
- if (_specialBuffer) {
- free(_specialBuffer);
- _specialBuffer = NULL;
- }
+ delete _smixer;
+ _smixer = NULL;
+
+ delete _base;
+ _base = NULL;
+
+ free(_specialBuffer);
+ _specialBuffer = NULL;
+
+ free(_frameBuffer);
+ _frameBuffer = NULL;
_vm->_mixer->stopHandle(_compressedFileSoundHandle);