mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 23:25:09 -05:00
fix crash when attempting to close project that is never opened
This commit is contained in:
@@ -399,7 +399,9 @@ void MainWindow::on_action_Open_Project_triggered()
|
||||
}
|
||||
QString dir = getExistingDirectory(recent);
|
||||
if (!dir.isEmpty()) {
|
||||
Scripting::cb_ProjectClosed(this->editor->project->root);
|
||||
if (this->editor && this->editor->project) {
|
||||
Scripting::cb_ProjectClosed(this->editor->project->root);
|
||||
}
|
||||
porymapConfig.setRecentProject(dir);
|
||||
if (!openProject(dir)) {
|
||||
this->initWindow();
|
||||
|
||||
Reference in New Issue
Block a user