aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/window.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-05-05 20:29:37 +1000
committerPaul Gilbert2012-05-05 20:29:37 +1000
commitaa603d5a6719764e785e4bd096f16493f7ec7f6c (patch)
treeaf4cac7b6b8a2149985d354b4edba6b90a687eb9 /engines/tony/window.cpp
parentfbee927c6a648ee1e3f162f0ec6b9d298619dd9f (diff)
downloadscummvm-rg350-aa603d5a6719764e785e4bd096f16493f7ec7f6c.tar.gz
scummvm-rg350-aa603d5a6719764e785e4bd096f16493f7ec7f6c.tar.bz2
scummvm-rg350-aa603d5a6719764e785e4bd096f16493f7ec7f6c.zip
TONY: Fix a crash from objects being destroyed in the wrong order
Diffstat (limited to 'engines/tony/window.cpp')
-rw-r--r--engines/tony/window.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index 41821ccacc..ae8d3612c3 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -57,9 +57,18 @@ namespace Tony {
static uint16 m_wPrecalcTable[0x10000];
/****************************************************************************\
-* Metodi di RMWindow
+* RMWindow Methods
\****************************************************************************/
+RMWindow::RMWindow() {
+ m_Primary = NULL; m_Back = NULL;
+}
+
+RMWindow::~RMWindow() {
+ Close();
+ RMText::Unload();
+}
+
#ifdef REFACTOR_ME
LRESULT CALLBACK GlobalWindowProc(HWND hWnd, uint32 msg, uint16 wParam, int32 lParam) {
if ((HWND)theGame.m_wnd == NULL)