summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/config_file.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index d79a3d1288..f2d6f78664 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -127,6 +127,8 @@ Error ConfigFile::save(const String& p_path){
FileAccess *file = FileAccess::open(p_path,FileAccess::WRITE,&err);
if (err) {
+ if (file)
+ memdelete(file);
return err;
}