diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-30 17:03:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-30 17:03:14 +0100 |
commit | 2f8cb1547ccfe3ee66b5325372c70c597d80c192 (patch) | |
tree | d7dca285650887814f85d9f2c5e718e53c75dc2a /editor | |
parent | 2a702cff419b82d6e871cc791f4beb3db7b36a5b (diff) | |
parent | 98ad5cd3db4654b031ce887fe3af77a3bd3b4f3a (diff) |
Merge pull request #55477 from pycbouh/editor-crash-script-parent-check
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_data.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index a163b468e6..6fd8cb47ea 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -893,8 +893,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) { |