diff options
author | Sven Hesse | 2007-08-07 20:43:41 +0000 |
---|---|---|
committer | Sven Hesse | 2007-08-07 20:43:41 +0000 |
commit | d66750777503d8b05676705e46ab9640240c4b25 (patch) | |
tree | 8fc392887ee8854c6a03ce5ceb92e93bb8733050 /engines/gob/saveload.cpp | |
parent | f93ffdbc2d941129da196ed23efce4eaa92a0b01 (diff) | |
download | scummvm-rg350-d66750777503d8b05676705e46ab9640240c4b25.tar.gz scummvm-rg350-d66750777503d8b05676705e46ab9640240c4b25.tar.bz2 scummvm-rg350-d66750777503d8b05676705e46ab9640240c4b25.zip |
Fixing my leak fix...
svn-id: r28487
Diffstat (limited to 'engines/gob/saveload.cpp')
-rw-r--r-- | engines/gob/saveload.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/gob/saveload.cpp b/engines/gob/saveload.cpp index f4cb7bcf7a..ea22ede7b6 100644 --- a/engines/gob/saveload.cpp +++ b/engines/gob/saveload.cpp @@ -62,9 +62,11 @@ SaveLoad::SaveLoad(GobEngine *vm, const char *targetName) : _vm(vm) { } SaveLoad::~SaveLoad() { - for (int i = 0; i < _stagesCount; i++) - delete[] _buffer[i]; - delete[] _buffer; + if (_buffer) { + for (int i = 0; i < _stagesCount; i++) + delete[] _buffer[i]; + delete[] _buffer; + } delete _tempSprite; |