diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/syncedsettings.h | 2 |
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); } |