diff options
Diffstat (limited to 'engines/toon/hotspot.cpp')
-rw-r--r-- | engines/toon/hotspot.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/toon/hotspot.cpp b/engines/toon/hotspot.cpp index 782e49c2d5..687ea6ee83 100644 --- a/engines/toon/hotspot.cpp +++ b/engines/toon/hotspot.cpp @@ -29,11 +29,12 @@ namespace Toon { Hotspots::Hotspots(ToonEngine *vm) : _vm(vm) { - _items = 0; + _items = NULL; _numItems = 0; } Hotspots::~Hotspots() { + delete[] _items; } void Hotspots::load(Common::ReadStream *Stream) { @@ -49,7 +50,6 @@ void Hotspots::load(Common::ReadStream *Stream) { } void Hotspots::save(Common::WriteStream *Stream) { - Stream->writeSint16BE(_numItems); for (int32 i = 0; i < _numItems; i++) { @@ -123,9 +123,7 @@ bool Hotspots::LoadRif(Common::String rifName, Common::String additionalRifName) _numItems = (rifsize + rifsize2) / 512; - if (_items) - delete[] _items; - + delete[] _items; _items = new HotspotData[_numItems]; // RIFs are compressed in RNC1 |