From aa603d5a6719764e785e4bd096f16493f7ec7f6c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 5 May 2012 20:29:37 +1000 Subject: TONY: Fix a crash from objects being destroyed in the wrong order --- engines/tony/window.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'engines/tony/window.cpp') 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) -- cgit v1.2.3