mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 02:13:36 +00:00
-fix stray file left open when parsing configuration, closes #3299
This commit is contained in:
parent
f5a3c1ccde
commit
6c8cf30697
1 changed files with 3 additions and 1 deletions
|
|
@ -180,8 +180,10 @@ Error ConfigFile::load(const String& p_path) {
|
||||||
next_tag.name=String();
|
next_tag.name=String();
|
||||||
|
|
||||||
err = VariantParser::parse_tag_assign_eof(&stream,lines,error_text,next_tag,assign,value,NULL,true);
|
err = VariantParser::parse_tag_assign_eof(&stream,lines,error_text,next_tag,assign,value,NULL,true);
|
||||||
if (err==ERR_FILE_EOF)
|
if (err==ERR_FILE_EOF) {
|
||||||
|
memdelete(f);
|
||||||
return OK;
|
return OK;
|
||||||
|
}
|
||||||
else if (err!=OK) {
|
else if (err!=OK) {
|
||||||
ERR_PRINTS("ConfgFile::load - "+p_path+":"+itos(lines)+" error: "+error_text);
|
ERR_PRINTS("ConfgFile::load - "+p_path+":"+itos(lines)+" error: "+error_text);
|
||||||
memdelete(f);
|
memdelete(f);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue