diff options
author | Vaxry <[email protected]> | 2023-11-17 22:24:52 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2023-11-17 22:24:52 +0000 |
commit | 395985f81533417d74e1168ac7ea7a9a84c81d21 (patch) | |
tree | 2051532893270ae975961e18dae086f3cc3bb56f /src/plugins | |
parent | 51282f964f0bbf8e04fb3a62435a4e925b8945ed (diff) | |
download | Hyprland-395985f81533417d74e1168ac7ea7a9a84c81d21.tar.gz Hyprland-395985f81533417d74e1168ac7ea7a9a84c81d21.zip |
pluginmgr: fix double use of dlerror()
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/PluginSystem.cpp | 5 |
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; } |