diff options
| author | Qudix <17361645+Qudix@users.noreply.github.com> | 2020-11-14 00:36:57 -0600 |
|---|---|---|
| committer | Qudix <17361645+Qudix@users.noreply.github.com> | 2020-11-14 00:36:57 -0600 |
| commit | 24991bf5fb1dcf4ccee1090285bec10b3a20bf81 (patch) | |
| tree | 49a9444ae24e25263ebee6ea601e4c5bb239447a /src/instancemanagerdialog.cpp | |
| parent | 125fc7a82e5ddf51b91f834661f7de9356831714 (diff) | |
| parent | 579f94b5b6014ad4a97b23eb2a26ab69f007aa6a (diff) | |
Merge branch 'master' of https://github.com/ModOrganizer2/modorganizer into master
Diffstat (limited to 'src/instancemanagerdialog.cpp')
| -rw-r--r-- | src/instancemanagerdialog.cpp | 6 |
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; } |
