From 03f377bf40b41c59fcb1c545d048bd71c396c1e3 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 18 Jun 2023 10:18:41 +0200 Subject: [PATCH] fix: Don't try to initialize plugins that failed to load --- lib/libimhex/source/api/plugin_manager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libimhex/source/api/plugin_manager.cpp b/lib/libimhex/source/api/plugin_manager.cpp index 542191646..3710a928b 100644 --- a/lib/libimhex/source/api/plugin_manager.cpp +++ b/lib/libimhex/source/api/plugin_manager.cpp @@ -69,6 +69,9 @@ namespace hex { } bool Plugin::initializePlugin() const { + if (this->m_handle == nullptr) + return false; + const auto requestedVersion = getCompatibleVersion(); if (requestedVersion != IMHEX_VERSION) { log::error("Refused to load plugin '{}' which was built for a different version of ImHex: '{}'", wolv::util::toUTF8String(this->m_path.filename()), requestedVersion);