diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-05-02 23:29:47 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-05-02 23:29:47 +0200 |
commit | 907aa367046bde6ad05893917cff11320019ddda (patch) | |
tree | c937c84bb16ae224b38a0ca9b6f489bf8ee1580b /application/MainWindow.cpp | |
parent | 6a8bb3691b9e30bcb90003eead34b287010cf17f (diff) | |
download | MultiMC-907aa367046bde6ad05893917cff11320019ddda.tar MultiMC-907aa367046bde6ad05893917cff11320019ddda.tar.gz MultiMC-907aa367046bde6ad05893917cff11320019ddda.tar.lz MultiMC-907aa367046bde6ad05893917cff11320019ddda.tar.xz MultiMC-907aa367046bde6ad05893917cff11320019ddda.zip |
GH-1874 Do not allow launching instances during an update
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r-- | application/MainWindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 4ec0af86..9ecfbfd0 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -989,8 +989,14 @@ void MainWindow::downloadUpdates(GoUpdate::Status status) // If the task succeeds, install the updates. if (updateDlg.execWithTask(&updateTask)) { + /** + * NOTE: This disables launching instances until the update either succeeds (and this process exits) + * or the update fails (and the control leaves this scope). + */ + MMC->updateIsRunning(true); UpdateController update(this, MMC->root(), updateTask.updateFilesDir(), updateTask.operations()); update.installUpdates(); + MMC->updateIsRunning(false); } else { |