aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorrichiesams2013-09-03 00:26:13 -0500
committerrichiesams2013-09-03 00:26:13 -0500
commit78d5a41cd0812353e0dbc675f010540dc630f343 (patch)
treea0cc7c7678b7ebfcd0cbd819170d8d030696b21d /engines
parenta76f852c385576a84f613489417d71b3ec49b2c6 (diff)
downloadscummvm-rg350-78d5a41cd0812353e0dbc675f010540dc630f343.tar.gz
scummvm-rg350-78d5a41cd0812353e0dbc675f010540dc630f343.tar.bz2
scummvm-rg350-78d5a41cd0812353e0dbc675f010540dc630f343.zip
ZVISION: Call Surface::free() in the cursor destructor
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/cursor.cpp5
-rw-r--r--engines/zvision/cursor.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/engines/zvision/cursor.cpp b/engines/zvision/cursor.cpp
index 4731d29f00..bb0700cebe 100644
--- a/engines/zvision/cursor.cpp
+++ b/engines/zvision/cursor.cpp
@@ -81,9 +81,14 @@ ZorkCursor &ZorkCursor::operator=(const ZorkCursor &other) {
_hotspotX = other._hotspotX;
_hotspotY = other._hotspotY;
+ _surface.free();
_surface.copyFrom(other._surface);
return *this;
}
+ZorkCursor::~ZorkCursor() {
+ _surface.free();
+}
+
} // End of namespace ZVision
diff --git a/engines/zvision/cursor.h b/engines/zvision/cursor.h
index ec9f5ed0d7..805a8e7982 100644
--- a/engines/zvision/cursor.h
+++ b/engines/zvision/cursor.h
@@ -42,6 +42,7 @@ public:
ZorkCursor();
ZorkCursor(const Common::String &fileName);
ZorkCursor(const ZorkCursor &other);
+ ~ZorkCursor();
private:
uint16 _width;