Browse Source

Clear patch when loading before clearing autosave, since modules in the patch could hold handles to patch storage when clearing.

tags/v2.0.3
Andrew Belt 2 years ago
parent
commit
e1ac2c6859
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/patch.cpp

+ 4
- 1
src/patch.cpp View File

@@ -248,6 +248,8 @@ static bool isPatchLegacyV1(std::string path) {
void Manager::load(std::string path) {
INFO("Loading patch %s", path.c_str());

clear();

system::removeRecursively(autosavePath);
system::createDirectories(autosavePath);

@@ -268,6 +270,8 @@ void Manager::load(std::string path) {


void Manager::loadTemplate() {
clear();

try {
load(templatePath);
}
@@ -282,7 +286,6 @@ void Manager::loadTemplate() {

system::removeRecursively(autosavePath);
system::createDirectories(autosavePath);
clear();
}
}



Loading…
Cancel
Save