You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Make FileAccess and DirAccess classes reference counted.
This commit is contained in:
@@ -472,7 +472,7 @@ Error XMLParser::open_buffer(const Vector<uint8_t> &p_buffer) {
|
||||
|
||||
Error XMLParser::open(const String &p_path) {
|
||||
Error err;
|
||||
FileAccess *file = FileAccess::open(p_path, FileAccess::READ, &err);
|
||||
Ref<FileAccess> file = FileAccess::open(p_path, FileAccess::READ, &err);
|
||||
|
||||
ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot open file '" + p_path + "'.");
|
||||
|
||||
@@ -488,8 +488,6 @@ Error XMLParser::open(const String &p_path) {
|
||||
data[length] = 0;
|
||||
P = data;
|
||||
|
||||
memdelete(file);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user