diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 062d522b681..567c748cd3d 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -889,7 +889,11 @@ static void _get_directory_contents(EditorFileSystemDirectory *p_dir, HashMap &r_result, String &r_arghint) { - r_arghint = _make_arguments_hint(p_annotation->info->info, p_argument, true); + ERR_FAIL_NULL(p_annotation); + + if (p_annotation->info != nullptr) { + r_arghint = _make_arguments_hint(p_annotation->info->info, p_argument, true); + } if (p_annotation->name == SNAME("@export_range")) { if (p_argument == 3 || p_argument == 4 || p_argument == 5) { // Slider hint. diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h index 22b14e8bb5c..5da2bc80207 100644 --- a/modules/gdscript/gdscript_parser.h +++ b/modules/gdscript/gdscript_parser.h @@ -372,6 +372,7 @@ public: Vector arguments; Vector resolved_arguments; + /** Information of the annotation. Might be null for unknown annotations. */ AnnotationInfo *info = nullptr; PropertyInfo export_info; bool is_resolved = false;