summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-06-26 11:08:41 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-06-26 11:08:41 +0200
commit97e4ed4348a7edf8a341fb1bafcb9d5b9794f71b (patch)
treec81d4577b503fbf2a757f245d276224134915cb3 /modules/gdscript/gdscript_analyzer.cpp
parent2161f98ac178d014371310e9cc13dff144c187d2 (diff)
parente18db6fe608acd54cd2ab6c5faedb34f55bd3b92 (diff)
downloadredot-engine-97e4ed4348a7edf8a341fb1bafcb9d5b9794f71b.tar.gz
Merge pull request #93575 from Hilderin/fix-editor-crash-on-invalid-global-class-path
Fix editor crash when invalid global class script path
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index aa26bb222d..c60672d3f4 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -5527,6 +5527,9 @@ bool GDScriptAnalyzer::check_type_compatibility(const GDScriptParser::DataType &
// A script type cannot be a subtype of a GDScript class.
return false;
}
+ if (p_source.script_type.is_null()) {
+ return false;
+ }
if (p_source.is_meta_type) {
src_native = p_source.script_type->get_class_name();
} else {