Script languges are uninitialized properly now.

This commit is contained in:
Juan Linietsky 2017-07-22 16:11:04 -03:00
parent c74a3275dc
commit 0ad1a8f3d0
3 changed files with 13 additions and 3 deletions

View file

@ -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;

View file

@ -69,6 +69,7 @@ public:
static void thread_exit();
static void init_languages();
static void finish_languages();
};
class ScriptInstance;

View file

@ -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();