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

View File

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