diff --git a/lib/libimhex/source/api/plugin_manager.cpp b/lib/libimhex/source/api/plugin_manager.cpp index 979e08b4b..16ac1c9af 100644 --- a/lib/libimhex/source/api/plugin_manager.cpp +++ b/lib/libimhex/source/api/plugin_manager.cpp @@ -67,7 +67,8 @@ namespace hex { if (this->m_handle != 0) FreeLibrary(HMODULE(this->m_handle)); #else - dlclose(reinterpret_cast(this->m_handle)); + if (this->m_handle != 0) + dlclose(reinterpret_cast(this->m_handle)); #endif }