Skip to content

Commit 0c5b6bf

Browse files
authored
Update dlutils.hpp
1 parent 8b55ef3 commit 0c5b6bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/dlutils/dlutils.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ class DlLibBase {
189189

190190
/// @brief Destructor (default)
191191
~DlLibBase() {
192-
dlclose(libptr_);
192+
if(libptr_ != nullptr) {
193+
dlclose(libptr_);
194+
}
193195
}
194196

195197
/// @brief Open the dynamic library

0 commit comments

Comments
 (0)