summaryrefslogtreecommitdiffstats
path: root/application/MainWindow.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-05-02 23:29:47 +0200
committerPetr Mrázek <peterix@gmail.com>2017-05-02 23:29:47 +0200
commit907aa367046bde6ad05893917cff11320019ddda (patch)
treec937c84bb16ae224b38a0ca9b6f489bf8ee1580b /application/MainWindow.cpp
parent6a8bb3691b9e30bcb90003eead34b287010cf17f (diff)
downloadMultiMC-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.cpp6
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
{