1
0
mirror of synced 2024-09-24 03:28:24 +02:00

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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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