C#: Fix crash when errors occur before language initialization.
This commit is contained in:
parent
8208060c21
commit
c0ebc28136
|
@ -589,7 +589,7 @@ Vector<ScriptLanguage::StackInfo> CSharpLanguage::debug_get_current_stack_info()
|
||||||
_recursion_flag_ = false;
|
_recursion_flag_ = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!gdmono->is_runtime_initialized()) {
|
if (!gdmono || !gdmono->is_runtime_initialized()) {
|
||||||
return Vector<StackInfo>();
|
return Vector<StackInfo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,6 +679,7 @@ void CSharpLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_soft
|
||||||
|
|
||||||
#ifdef GD_MONO_HOT_RELOAD
|
#ifdef GD_MONO_HOT_RELOAD
|
||||||
bool CSharpLanguage::is_assembly_reloading_needed() {
|
bool CSharpLanguage::is_assembly_reloading_needed() {
|
||||||
|
ERR_FAIL_NULL_V(gdmono, false);
|
||||||
if (!gdmono->is_runtime_initialized()) {
|
if (!gdmono->is_runtime_initialized()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -713,6 +714,7 @@ bool CSharpLanguage::is_assembly_reloading_needed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
|
void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
|
||||||
|
ERR_FAIL_NULL(gdmono);
|
||||||
if (!gdmono->is_runtime_initialized()) {
|
if (!gdmono->is_runtime_initialized()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue