aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/input_handler.cpp4
-rw-r--r--engines/titanic/input_handler.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/engines/titanic/input_handler.cpp b/engines/titanic/input_handler.cpp
index 2c51f3ece7..df09cf24fb 100644
--- a/engines/titanic/input_handler.cpp
+++ b/engines/titanic/input_handler.cpp
@@ -36,6 +36,10 @@ CInputHandler::CInputHandler(CGameManager *owner) :
CScreenManager::_screenManagerPtr->_inputHandler = this;
}
+CInputHandler::~CInputHandler() {
+ CScreenManager::_screenManagerPtr->_inputHandler = nullptr;
+}
+
void CInputHandler::setTranslator(CInputTranslator *translator) {
_inputTranslator = translator;
}
diff --git a/engines/titanic/input_handler.h b/engines/titanic/input_handler.h
index 7244ddc050..d5f29b7921 100644
--- a/engines/titanic/input_handler.h
+++ b/engines/titanic/input_handler.h
@@ -59,6 +59,7 @@ public:
bool _singleton;
public:
CInputHandler(CGameManager *owner);
+ ~CInputHandler();
void setTranslator(CInputTranslator *translator);