summaryrefslogtreecommitdiff
path: root/src/syncedsettings.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/syncedsettings.h')
-rw-r--r--src/syncedsettings.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/syncedsettings.h b/src/syncedsettings.h
index eb8e66e..e60eb78 100644
--- a/src/syncedsettings.h
+++ b/src/syncedsettings.h
@@ -76,6 +76,7 @@ public:
: mutex{}
, data{}
{
+ std::lock_guard<std::mutex> lock{mutex};
std::lock_guard<std::mutex> lock{other.mutex};
data = other.data;
}
@@ -84,6 +85,7 @@ public:
: mutex{}
, data{}
{
+ std::lock_guard<std::mutex> lock{mutex};
std::lock_guard<std::mutex> lock{other.mutex};
std::swap(data, other.data);
}