diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-07-22 16:11:04 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-07-22 16:11:56 -0300 |
commit | 0ad1a8f3d00f1927765f7ad687a470f96373729a (patch) | |
tree | bbefc779772c882124abadce51235d6a755fe486 | |
parent | c74a3275dcce579287d954451d225742581bbb42 (diff) |
Script languges are uninitialized properly now.
-rw-r--r-- | core/script_language.cpp | 7 | ||||
-rw-r--r-- | core/script_language.h | 1 | ||||
-rw-r--r-- | main/main.cpp | 8 |
3 files changed, 13 insertions, 3 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp index 4a7fdc9d64..aeb1573840 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -99,6 +99,13 @@ void ScriptServer::init_languages() { } } +void ScriptServer::finish_languages() { + + for (int i = 0; i < _language_count; i++) { + _languages[i]->finish(); + } +} + void ScriptServer::set_reload_scripts_on_save(bool p_enable) { reload_scripts_on_save = p_enable; diff --git a/core/script_language.h b/core/script_language.h index a81300233f..7aba3ec0f1 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -69,6 +69,7 @@ public: static void thread_exit(); static void init_languages(); + static void finish_languages(); }; class ScriptInstance; diff --git a/main/main.cpp b/main/main.cpp index 5fef3658b9..8960d85c45 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1697,14 +1697,16 @@ void Main::cleanup() { OS::get_singleton()->_execpath = ""; OS::get_singleton()->_local_clipboard = ""; - if (audio_server) { - memdelete(audio_server); - } + ScriptServer::finish_languages(); #ifdef TOOLS_ENABLED EditorNode::unregister_editor_types(); #endif + if (audio_server) { + memdelete(audio_server); + } + unregister_driver_types(); unregister_module_types(); unregister_scene_types(); |