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;