diff options
Diffstat (limited to 'engines/gob/sound/sounddesc.cpp')
-rw-r--r-- | engines/gob/sound/sounddesc.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/gob/sound/sounddesc.cpp b/engines/gob/sound/sounddesc.cpp index 79f4a48b77..b9b327d105 100644 --- a/engines/gob/sound/sounddesc.cpp +++ b/engines/gob/sound/sounddesc.cpp @@ -101,10 +101,16 @@ bool SoundDesc::load(SoundType type, Resource *resource) { } void SoundDesc::free() { - delete _resource; + if (_resource) { + delete _resource; + _data = 0; + } + + delete[] _data; _resource = 0; - _data = _dataPtr = 0; + _data = 0; + _dataPtr = 0; _id = 0; } |