aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tony/game.cpp6
-rw-r--r--engines/tony/gfxcore.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 1fe5956ffe..03cc80d93d 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -1371,6 +1371,7 @@ bool RMOptionScreen::LoadThumbnailFromSaveState(int nState, byte *lpDestBuf, RMS
RMPointer::RMPointer() {
Common::fill(m_pointer, m_pointer + 16, (RMGfxSourceBuffer8 *)NULL);
+ Common::fill(m_specialPointer, m_specialPointer + 16, (RMItem *)NULL);
}
RMPointer::~RMPointer() {
@@ -1417,6 +1418,11 @@ void RMPointer::Close(void) {
delete m_pointer[i];
m_pointer[i] = NULL;
}
+
+ if (m_specialPointer[i] != NULL) {
+ delete m_specialPointer[i];
+ m_specialPointer[i] = NULL;
+ }
}
}
diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h
index 0f2c2553ec..88f2d6ed22 100644
--- a/engines/tony/gfxcore.h
+++ b/engines/tony/gfxcore.h
@@ -195,7 +195,7 @@ public:
// Registration
virtual void Register(void) { m_nInList++; }
- virtual void Unregister(void) { m_nInList--; assert(m_nInList>=0); }
+ virtual void Unregister(void) { m_nInList--; assert(m_nInList >= 0); }
};