Fix a crash in editor's script parent class check
This commit is contained in:
parent
6cf77f80b5
commit
62c34a6be7
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue