diff options
author | Andrei Prykhodko | 2018-07-22 21:33:48 +0300 |
---|---|---|
committer | Andrei Prykhodko | 2018-07-22 21:33:48 +0300 |
commit | 1832dd0babb0b477a59d77f15c3a8d376b37018b (patch) | |
tree | e57e1c0309c16c1ee38690288438377f0e1f06aa | |
parent | c06e2abfb09f3dfa414e2a30b6f5cef1b4db40f8 (diff) | |
download | scummvm-rg350-1832dd0babb0b477a59d77f15c3a8d376b37018b.tar.gz scummvm-rg350-1832dd0babb0b477a59d77f15c3a8d376b37018b.tar.bz2 scummvm-rg350-1832dd0babb0b477a59d77f15c3a8d376b37018b.zip |
PINK: fixed starting new game from menu in pda state
-rw-r--r-- | engines/pink/pda_mgr.cpp | 3 | ||||
-rw-r--r-- | engines/pink/pda_mgr.h | 3 | ||||
-rw-r--r-- | engines/pink/pink.cpp | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/engines/pink/pda_mgr.cpp b/engines/pink/pda_mgr.cpp index 29911e19f6..7a151c0ca7 100644 --- a/engines/pink/pda_mgr.cpp +++ b/engines/pink/pda_mgr.cpp @@ -172,6 +172,9 @@ void PDAMgr::onMouseMove(Common::Point point) { } void PDAMgr::close() { + if (!_globalPage) + return; + delete _globalPage; delete _page; _globalPage = nullptr; diff --git a/engines/pink/pda_mgr.h b/engines/pink/pda_mgr.h index afcae1ba53..dda4cf020f 100644 --- a/engines/pink/pda_mgr.h +++ b/engines/pink/pda_mgr.h @@ -50,6 +50,8 @@ public: void update() { _cursorMgr.update(); } + void close(); + void onLeftButtonClick(Common::Point point); void onLeftButtonUp(Common::Point point); void onMouseMove(Common::Point point); @@ -60,7 +62,6 @@ public: void setLead(LeadActor *lead) { _lead = lead; } private: - void close(); void loadGlobal(); void initPerilButtons(); diff --git a/engines/pink/pink.cpp b/engines/pink/pink.cpp index 2f645c76d4..895300a565 100644 --- a/engines/pink/pink.cpp +++ b/engines/pink/pink.cpp @@ -214,6 +214,7 @@ void PinkEngine::addModule(const Common::String &moduleName) { void PinkEngine::removeModule() { for (uint i = 0; i < _modules.size(); ++i) { if (_module == _modules[i]) { + _pdaMgr.close(); _modules[i] = new ModuleProxy(_module->getName()); delete _module; _module = nullptr; |