Reorder Editor/Song destruction order to prevent bad memory accesses (issue #2015)

This commit is contained in:
Colin Wallace
2015-05-12 18:56:58 +00:00
parent 2f969c1e1c
commit 12f299bb9e
3 changed files with 60 additions and 0 deletions

View File

@@ -216,6 +216,11 @@ MainWindow::~MainWindow()
delete view;
}
// TODO: Close tools
// dependencies are such that the editors must be destroyed BEFORE Song is deletect in Engine::destroy
// see issue #2015 on github
delete gui->automationEditor();
delete gui->pianoRoll();
delete gui->songEditor();
// destroy engine which will do further cleanups etc.
Engine::destroy();
}