diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index fbca71f2980..4ed54eabb11 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -3497,6 +3497,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { } break; case GDScriptTokenizer::TK_PR_CLASS_NAME: { + _mark_line_as_safe(tokenizer->get_token_line()); if (p_class->owner) { _set_error("'class_name' is only valid for the main class namespace."); return;