mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 05:04:10 +00:00
Fixes leak when pck_start multiple times
This commit is contained in:
parent
adb6734b49
commit
07941178f0
@ -63,6 +63,10 @@ void PCKPacker::_bind_methods() {
|
||||
|
||||
Error PCKPacker::pck_start(const String &p_file, int p_alignment) {
|
||||
|
||||
if (file != NULL) {
|
||||
memdelete(file);
|
||||
}
|
||||
|
||||
file = FileAccess::open(p_file, FileAccess::WRITE);
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!file, ERR_CANT_CREATE, "Can't open file to write: " + String(p_file) + ".");
|
||||
|
Loading…
Reference in New Issue
Block a user