HDB: Fix allocation problem with g_hdb

This commit is contained in:
Nipun Garg 2019-06-06 03:22:09 +05:30 committed by Eugene Sandulenko
parent ccce71fabb
commit 538ead52bb
2 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,8 @@
namespace HDB {
HDBGame* g_hdb;
HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
_console = nullptr;
_systemInit = false;
@ -49,7 +51,6 @@ HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst
HDBGame::~HDBGame() {
delete _console;
delete g_hdb;
delete fileMan;
delete lua;
DebugMan.clearAllDebugChannels();

View File

@ -103,7 +103,7 @@ private:
};
static HDBGame *g_hdb;
extern HDBGame *g_hdb;
}// End of namespace HDB