aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/plugins
diff options
context:
space:
mode:
authorVaxry <[email protected]>2023-11-17 22:24:52 +0000
committerVaxry <[email protected]>2023-11-17 22:24:52 +0000
commit395985f81533417d74e1168ac7ea7a9a84c81d21 (patch)
tree2051532893270ae975961e18dae086f3cc3bb56f /src/plugins
parent51282f964f0bbf8e04fb3a62435a4e925b8945ed (diff)
downloadHyprland-395985f81533417d74e1168ac7ea7a9a84c81d21.tar.gz
Hyprland-395985f81533417d74e1168ac7ea7a9a84c81d21.zip
pluginmgr: fix double use of dlerror()
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/PluginSystem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/PluginSystem.cpp b/src/plugins/PluginSystem.cpp
index 07dd226c..1468cb79 100644
--- a/src/plugins/PluginSystem.cpp
+++ b/src/plugins/PluginSystem.cpp
@@ -25,8 +25,9 @@ CPlugin* CPluginSystem::loadPlugin(const std::string& path) {
HANDLE MODULE = dlopen(path.c_str(), RTLD_LAZY);
if (!MODULE) {
- m_szLastError = std::format("Plugin {} could not be loaded: {}", path, dlerror());
- Debug::log(ERR, " [PluginSystem] Plugin {} could not be loaded: {}", path, dlerror());
+ std::string strerr = dlerror();
+ m_szLastError = std::format("Plugin {} could not be loaded: {}", path, strerr);
+ Debug::log(ERR, " [PluginSystem] Plugin {} could not be loaded: {}", path, strerr);
m_vLoadedPlugins.pop_back();
return nullptr;
}