aboutsummaryrefslogtreecommitdiff
path: root/core/io/resource_format_xml.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-03-02 00:54:10 -0300
committerJuan Linietsky2015-03-02 00:54:43 -0300
commita1f715a4da71fbc2b7d6fad68624bf8b22c6da17 (patch)
tree5cd305c8f8858504f0b5efb804b2c291b1dc5089 /core/io/resource_format_xml.cpp
parent0e732637d07d908daf64526f222e71fea402f3db (diff)
downloadgodot-a1f715a4da71fbc2b7d6fad68624bf8b22c6da17.tar.gz
godot-a1f715a4da71fbc2b7d6fad68624bf8b22c6da17.tar.zst
godot-a1f715a4da71fbc2b7d6fad68624bf8b22c6da17.zip
Diffstat (limited to 'core/io/resource_format_xml.cpp')
-rw-r--r--core/io/resource_format_xml.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp
index 75384d4ab..033b4d5e5 100644
--- a/core/io/resource_format_xml.cpp
+++ b/core/io/resource_format_xml.cpp
@@ -2592,6 +2592,11 @@ Error ResourceFormatSaverXMLInstance::save(const String &p_path,const RES& p_res
}
exit_tag("resource_file");
+ if (f->get_error()!=OK && f->get_error()!=ERR_FILE_EOF) {
+ f->close();
+ return ERR_CANT_CREATE;
+ }
+
f->close();
//memdelete(f);