mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Initialized scriptDialog pointer properly and deleted it on game exit.
This commit is contained in:
+7
-1
@@ -60,6 +60,9 @@
|
|||||||
#include "Tiles.h"
|
#include "Tiles.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
#if (_MSC_VER < 1600)
|
||||||
|
#include "Cpp11_emu.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
bool IsDebug = false;
|
bool IsDebug = false;
|
||||||
|
|
||||||
@@ -83,7 +86,7 @@ static const char* musicOverridePath="data\\sound\\music\\";
|
|||||||
|
|
||||||
bool npcautolevel;
|
bool npcautolevel;
|
||||||
|
|
||||||
static int* scriptDialog;
|
static int* scriptDialog = nullptr;
|
||||||
|
|
||||||
//GetTickCount calls
|
//GetTickCount calls
|
||||||
static const DWORD offsetsA[] = {
|
static const DWORD offsetsA[] = {
|
||||||
@@ -1622,6 +1625,9 @@ static void DllMain2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void _stdcall OnExit() {
|
static void _stdcall OnExit() {
|
||||||
|
if (scriptDialog != nullptr) {
|
||||||
|
delete[] scriptDialog;
|
||||||
|
}
|
||||||
ClearReadExtraGameMsgFiles();
|
ClearReadExtraGameMsgFiles();
|
||||||
ConsoleExit();
|
ConsoleExit();
|
||||||
AnimationsAtOnceExit();
|
AnimationsAtOnceExit();
|
||||||
|
|||||||
Reference in New Issue
Block a user