From e5d105900ddcb82bc2adf7accb4be010e3b20113 Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 10 Aug 2015 20:04:31 +0000 Subject: (svn r27379) -Codechange: Do not throw in the destructors of ScriptTest/ExecMode. --- src/script/api/script_testmode.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/script/api/script_testmode.cpp') diff --git a/src/script/api/script_testmode.cpp b/src/script/api/script_testmode.cpp index 37f296de0..ed643c2d9 100644 --- a/src/script/api/script_testmode.cpp +++ b/src/script/api/script_testmode.cpp @@ -30,7 +30,7 @@ ScriptTestMode::ScriptTestMode() this->SetDoCommandMode(&ScriptTestMode::ModeProc, this); } -ScriptTestMode::~ScriptTestMode() +void ScriptTestMode::FinalRelease() { if (this->GetDoCommandModeInstance() != this) { /* Ignore this error if the script already died. */ @@ -38,5 +38,9 @@ ScriptTestMode::~ScriptTestMode() throw Script_FatalError("Testmode object was removed while it was not the latest *Mode object created."); } } +} + +ScriptTestMode::~ScriptTestMode() +{ this->SetDoCommandMode(this->last_mode, this->last_instance); } -- cgit v1.2.3-54-g00ecf