From 9e4930acece693b7ad7af8ea21596410bd5c46db Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 23 Mar 2024 21:16:27 +0100 Subject: [PATCH] Add missing lock to gLoadedData access --- source/utils/exports.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/utils/exports.cpp b/source/utils/exports.cpp index 4256995..69a463c 100644 --- a/source/utils/exports.cpp +++ b/source/utils/exports.cpp @@ -74,7 +74,10 @@ extern "C" PluginBackendApiErrorType WUPSLoadPluginAsData(WUPSBackendGetPluginIn return PLUGIN_BACKEND_API_ERROR_FAILED_ALLOC; } else { *out = pluginData->getHandle(); - gLoadedData.insert(std::move(pluginData)); + { + std::lock_guard lockLoadedData(gLoadedDataMutex); + gLoadedData.insert(std::move(pluginData)); + } } return PLUGIN_BACKEND_API_ERROR_NONE;