From 2053afe9349e25f8340585bdf64de2e00603adbe Mon Sep 17 00:00:00 2001 From: agsantos <aline.gondimsantos@savoirfairelinux.com> Date: Mon, 27 Sep 2021 15:52:19 -0400 Subject: [PATCH] plugin: fix duplicate handlers in memory Make sure we unload plugin before trying to load it. Change-Id: I87ac7b36378c0e70ecd101b68c8fcb8b7ea7fde8 --- src/plugin/pluginmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugin/pluginmanager.cpp b/src/plugin/pluginmanager.cpp index eb99d22635..d00bf5db40 100644 --- a/src/plugin/pluginmanager.cpp +++ b/src/plugin/pluginmanager.cpp @@ -51,8 +51,8 @@ bool PluginManager::load(const std::string& path) { auto it = dynPluginMap_.find(path); - if (it != dynPluginMap_.end() && !it->second.second) { - dynPluginMap_.erase(it); + if (it != dynPluginMap_.end()) { + unload(path); } std::string error; -- GitLab