Fix continuous attempt to reload domain with API assemblies out of sync

(cherry picked from commit 762c912e8e)
This commit is contained in:
Ignacio Etcheverry 2018-07-25 21:54:21 +02:00 committed by Hein-Pieter van Braam
parent fc678567d7
commit 1a325e3580

View file

@ -640,7 +640,8 @@ void CSharpLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_soft
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
void CSharpLanguage::reload_assemblies_if_needed(bool p_soft_reload) { void CSharpLanguage::reload_assemblies_if_needed(bool p_soft_reload) {
if (gdmono->is_runtime_initialized()) { if (!gdmono->is_runtime_initialized())
return;
GDMonoAssembly *proj_assembly = gdmono->get_project_assembly(); GDMonoAssembly *proj_assembly = gdmono->get_project_assembly();
@ -667,7 +668,12 @@ void CSharpLanguage::reload_assemblies_if_needed(bool p_soft_reload) {
if (!FileAccess::exists(GodotSharpDirs::get_res_temp_assemblies_dir().plus_file(name))) if (!FileAccess::exists(GodotSharpDirs::get_res_temp_assemblies_dir().plus_file(name)))
return; // No assembly to load return; // No assembly to load
} }
}
if (!gdmono->get_core_api_assembly() && gdmono->metadata_is_api_assembly_invalidated(APIAssembly::API_CORE))
return; // The core API assembly to load is invalidated
if (!gdmono->get_editor_api_assembly() && gdmono->metadata_is_api_assembly_invalidated(APIAssembly::API_EDITOR))
return; // The editor API assembly to load is invalidated
#ifndef NO_THREADS #ifndef NO_THREADS
lock->lock(); lock->lock();