diff options
Diffstat (limited to 'src/script/api/script_testmode.cpp')
-rw-r--r-- | src/script/api/script_testmode.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |