summaryrefslogtreecommitdiff
path: root/src/instancemanagerdialog.cpp
diff options
context:
space:
mode:
authorQudix <17361645+Qudix@users.noreply.github.com>2020-11-14 19:45:23 -0600
committerQudix <17361645+Qudix@users.noreply.github.com>2020-11-14 19:45:23 -0600
commit67188a39cb6aa9d1cad172aec6aac9977af8e79a (patch)
tree3e4e31887a57b49747c31c342077a164025f9066 /src/instancemanagerdialog.cpp
parentb9ec979b4c884b35981d0d6fe0abe914e00daa54 (diff)
parent4833e494d56b351e52423f2835a7a91ab8c284b6 (diff)
Merge branch 'master' of https://github.com/ModOrganizer2/modorganizer into tracking_integration
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;
}