summaryrefslogtreecommitdiff
path: root/src/instancemanagerdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/instancemanagerdialog.cpp')
-rw-r--r--src/instancemanagerdialog.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/instancemanagerdialog.cpp b/src/instancemanagerdialog.cpp
index ff76e121..2497d8d8 100644
--- a/src/instancemanagerdialog.cpp
+++ b/src/instancemanagerdialog.cpp
@@ -580,13 +580,17 @@ void InstanceManagerDialog::onSelection()
void InstanceManagerDialog::createNew()
{
- CreateInstanceDialog dlg(m_pc, &Settings::instance(), this);
+ // there might not be settings available; the dialog can be shown when the
+ // last selected instance doesn't exist anymore
+ CreateInstanceDialog dlg(m_pc, Settings::maybeInstance(), this);
+
if (dlg.exec() != QDialog::Accepted) {
return;
}
if (dlg.switching()) {
// restarting MO
+ accept();
return;
}