diff options
Diffstat (limited to 'engines/toon/hotspot.cpp')
-rw-r--r-- | engines/toon/hotspot.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/toon/hotspot.cpp b/engines/toon/hotspot.cpp index 5af61197d7..687ea6ee83 100644 --- a/engines/toon/hotspot.cpp +++ b/engines/toon/hotspot.cpp @@ -29,10 +29,13 @@ namespace Toon { Hotspots::Hotspots(ToonEngine *vm) : _vm(vm) { - _items = 0; + _items = NULL; _numItems = 0; } +Hotspots::~Hotspots() { + delete[] _items; +} void Hotspots::load(Common::ReadStream *Stream) { delete[] _items; @@ -47,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++) { @@ -121,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 |