Browse Source

Fix memory leak in patch::Manager::~Manager() is running in safe mode.

tags/v2.5.2
Andrew Belt 6 months ago
parent
commit
5ea08323e4
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      src/patch.cpp

+ 8
- 8
src/patch.cpp View File

@@ -47,16 +47,16 @@ Manager::~Manager() {
// In safe mode, delete autosave dir.
if (settings::safeMode) {
clearAutosave();
return;
}

// Dispatch onSave to all Modules so they save their patch storage, etc.
APP->engine->prepareSave();
// Save autosave if not headless
if (!settings::headless) {
APP->patch->saveAutosave();
else {
// Dispatch onSave to all Modules so they save their patch storage, etc.
APP->engine->prepareSave();
// Save autosave if not headless
if (!settings::headless) {
APP->patch->saveAutosave();
}
cleanAutosave();
}
cleanAutosave();

delete internal;
}


Loading…
Cancel
Save