Don't dlclose nullptrs in plugins (#179)

* dont dlclose nullptrs in plugins

this fixes a segmentation fault at startup when dlclose is called with a nullptr

* Style fixes

Co-authored-by: WerWolv <werwolv98@gmail.com>
This commit is contained in:
@xAndy
2021-02-26 12:49:33 +01:00
committed by GitHub
parent 4c9459def3
commit 372981920e

View File

@@ -41,7 +41,8 @@ namespace hex {
}
Plugin::~Plugin() {
dlclose(this->m_handle);
if (this->m_handle != nullptr)
dlclose(this->m_handle);
}
void Plugin::initializePlugin() const {