aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorNipun Garg2019-06-06 03:22:09 +0530
committerEugene Sandulenko2019-09-03 17:16:43 +0200
commit538ead52bb0142b18328edcf0a8495ba3406ff94 (patch)
tree269083bd964b35afd64a157f0346fcba0edaacd3 /engines/hdb
parentccce71fabb5860f12a69c7cc5d11edb853fdbd4d (diff)
downloadscummvm-rg350-538ead52bb0142b18328edcf0a8495ba3406ff94.tar.gz
scummvm-rg350-538ead52bb0142b18328edcf0a8495ba3406ff94.tar.bz2
scummvm-rg350-538ead52bb0142b18328edcf0a8495ba3406ff94.zip
HDB: Fix allocation problem with g_hdb
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/hdb.cpp3
-rw-r--r--engines/hdb/hdb.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index 2bb6b38b84..282cd81a63 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -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();
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index 641a4f2cee..82028d8c77 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -103,7 +103,7 @@ private:
};
-static HDBGame *g_hdb;
+extern HDBGame *g_hdb;
}// End of namespace HDB