From 4caa3fc17e7ff6d362b1569543c9ee790b0580d2 Mon Sep 17 00:00:00 2001 From: Arnaud Bienner Date: Sun, 20 May 2012 21:54:17 +0200 Subject: [PATCH] Mutex-lock DB to avoid concurrent access while doing backup DB, as it will be actually locked the DB, and what make Clementine stop if we try to modify it (e.g. add a new playlist) --- src/core/database.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/database.cpp b/src/core/database.cpp index 1f09db065..0447a6a26 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -719,6 +719,7 @@ void Database::DoBackup() { QSqlDatabase db(this->Connect()); // Before we overwrite anything, make sure the database is not corrupt + QMutexLocker l(&mutex_); const bool ok = IntegrityCheck(db); if (ok) {