mirror of https://github.com/WerWolv/ImHex.git
impr: Added error reporting for plugin unloading
This commit is contained in:
parent
576bc80716
commit
1c5d6cbe94
|
@ -79,7 +79,9 @@ namespace hex {
|
||||||
Plugin::~Plugin() {
|
Plugin::~Plugin() {
|
||||||
#if defined(OS_WINDOWS)
|
#if defined(OS_WINDOWS)
|
||||||
if (m_handle != 0)
|
if (m_handle != 0)
|
||||||
FreeLibrary(HMODULE(m_handle));
|
if (FreeLibrary(HMODULE(m_handle)) == FALSE) {
|
||||||
|
log::error("Error when unloading plugin '{}': {}!", wolv::util::toUTF8String(m_path.filename()), std::system_category().message(::GetLastError()));
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if (m_handle != 0)
|
if (m_handle != 0)
|
||||||
dlclose(reinterpret_cast<void*>(m_handle));
|
dlclose(reinterpret_cast<void*>(m_handle));
|
||||||
|
|
Loading…
Reference in New Issue