Merge pull request #55478 from pycbouh/editor-crash-script-parent-check-3.x

This commit is contained in:
Rémi Verschelde 2021-11-30 16:35:44 +01:00 committed by GitHub
commit a724168c28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -869,8 +869,13 @@ bool EditorData::script_class_is_parent(const String &p_class, const String &p_i
if (!ScriptServer::is_global_class(p_class)) {
return false;
}
String base = script_class_get_base(p_class);
Ref<Script> script = script_class_load_script(p_class);
if (script.is_null()) {
return false;
}
String base = script_class_get_base(p_class);
Ref<Script> base_script = script->get_base_script();
while (p_inherits != base) {