fix crash when attempting to close project that is never opened
This commit is contained in:
parent
a47ed7b402
commit
fcb320bd79
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue