diff options
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; |