From 907aa367046bde6ad05893917cff11320019ddda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 2 May 2017 23:29:47 +0200 Subject: GH-1874 Do not allow launching instances during an update --- application/MainWindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'application/MainWindow.cpp') 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 { -- cgit v1.2.3