aboutsummaryrefslogtreecommitdiff
path: root/src/node/warnings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/warnings.cpp')
-rw-r--r--src/node/warnings.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/node/warnings.cpp b/src/node/warnings.cpp
index b99c845900..87389e472b 100644
--- a/src/node/warnings.cpp
+++ b/src/node/warnings.cpp
@@ -28,8 +28,7 @@ Warnings::Warnings()
}
bool Warnings::Set(warning_type id, bilingual_str message)
{
- LOCK(m_mutex);
- const auto& [_, inserted]{m_warnings.insert({id, std::move(message)})};
+ const auto& [_, inserted]{WITH_LOCK(m_mutex, return m_warnings.insert({id, std::move(message)}))};
if (inserted) uiInterface.NotifyAlertChanged();
return inserted;
}