diff options
-rw-r--r-- | src/client.cpp | 2 | ||||
-rw-r--r-- | src/game.cpp | 2 | ||||
-rw-r--r-- | src/gui/windowmanager.cpp | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp index 0631b661c..75de57bbe 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -26,6 +26,7 @@ #include "auctionmanager.h" #include "chatlogger.h" +#include "commandhandler.h" #include "configmanager.h" #include "configuration.h" #include "dirs.h" @@ -600,6 +601,7 @@ void Client::gameClear() delete2(setupWindow); delete2(helpWindow); delete2(didYouKnowWindow); + delete2(commandHandler); stopTimers(); diff --git a/src/game.cpp b/src/game.cpp index 4e2977232..bca5813c1 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -140,7 +140,6 @@ const unsigned adjustDelay = 10; static void initEngines() { actorManager = new ActorManager; - commandHandler = new CommandHandler; effectManager = new EffectManager; AuctionManager::init(); GuildManager::init(); @@ -427,7 +426,6 @@ Game::~Game() delete2(actorManager) if (client->getState() != STATE_CHANGE_MAP) delete2(localPlayer) - delete2(commandHandler) delete2(effectManager) delete2(particleEngine) delete2(viewport) diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index 9c08f385e..4ed20e980 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -23,6 +23,7 @@ #include "gui/windowmanager.h" #include "client.h" +#include "commandhandler.h" #include "configuration.h" #include "game.h" #include "settings.h" @@ -90,6 +91,7 @@ void WindowManager::createWindows() helpWindow = new HelpWindow; didYouKnowWindow = new DidYouKnowWindow; didYouKnowWindow->postInit(); + commandHandler = new CommandHandler; } void WindowManager::initTitle() |