mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
TONY: Fix a crash from objects being destroyed in the wrong order
This commit is contained in:
parent
fbee927c6a
commit
aa603d5a67
@ -410,7 +410,6 @@ void TonyEngine::Close(void) {
|
||||
CloseMusic();
|
||||
CloseHandle(m_hEndOfFrame);
|
||||
_theBoxes.Close();
|
||||
RMText::Unload();
|
||||
_theEngine.Close();
|
||||
m_wnd.Close();
|
||||
delete[] m_curThumbnail;
|
||||
|
@ -108,7 +108,6 @@ public:
|
||||
FPSTREAM *m_stream[6];
|
||||
FPSFX *m_sfx[MAX_SFX_CHANNELS];
|
||||
FPSFX *m_utilSfx[MAX_SFX_CHANNELS];
|
||||
RMGfxEngine theEngine;
|
||||
RMFont *fonts[2];
|
||||
bool m_bPaused;
|
||||
bool m_bDrawLocation;
|
||||
@ -117,8 +116,8 @@ public:
|
||||
|
||||
// Bounding box list manager
|
||||
RMGameBoxes _theBoxes;
|
||||
RMGfxEngine _theEngine;
|
||||
RMWindow m_wnd;
|
||||
RMGfxEngine _theEngine;
|
||||
|
||||
bool m_bQuitNow;
|
||||
bool m_bTimeFreezed;
|
||||
|
@ -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)
|
||||
|
@ -121,8 +121,8 @@ protected:
|
||||
void WipeEffect(Common::Rect &rcBoundEllipse);
|
||||
|
||||
public:
|
||||
RMWindow() { m_Primary = NULL; m_Back = NULL; };
|
||||
~RMWindow() { Close(); }
|
||||
RMWindow();
|
||||
~RMWindow();
|
||||
|
||||
// Inizializzazione
|
||||
void Init(/*HINSTANCE hInst*/);
|
||||
|
Loading…
Reference in New Issue
Block a user