GDScript: Avoid editor crashes when there's cyclic inheritance
Make sure the script is fully compiled before looking into the base.
This commit is contained in:
parent
5d5df05ee1
commit
15800b4db8
|
@ -199,7 +199,7 @@ StringName GDScript::get_instance_base_type() const {
|
||||||
|
|
||||||
if (native.is_valid())
|
if (native.is_valid())
|
||||||
return native->get_name();
|
return native->get_name();
|
||||||
if (base.is_valid())
|
if (base.is_valid() && base->is_valid())
|
||||||
return base->get_instance_base_type();
|
return base->get_instance_base_type();
|
||||||
return StringName();
|
return StringName();
|
||||||
}
|
}
|
||||||
|
@ -486,7 +486,7 @@ bool GDScript::_update_exports() {
|
||||||
|
|
||||||
placeholder_fallback_enabled = false;
|
placeholder_fallback_enabled = false;
|
||||||
|
|
||||||
if (base_cache.is_valid()) {
|
if (base_cache.is_valid() && base_cache->is_valid()) {
|
||||||
if (base_cache->_update_exports()) {
|
if (base_cache->_update_exports()) {
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue