diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 85b538b1d96..98a49095994 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -511,6 +511,7 @@ Error ResourceLoaderText::load() { if (error) { _printerr(); + return error; } resource_current++; @@ -884,6 +885,7 @@ void ResourceLoaderText::get_dependencies(Ref p_f, List *p_d error_text = "Unexpected end of file"; _printerr(); error = ERR_FILE_CORRUPT; + return; } } }