From 8c73f68c16aa271b06921c8504fc478cc57b5582 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 14 Mar 2025 23:23:01 -0500 Subject: [PATCH] if check handle --- src/App.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/App.cpp b/src/App.cpp index f95f052..ed37ff9 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -85,8 +85,12 @@ void App::unload(decltype(Module::self) it) { std::cout << "retrieved handle\nAttempting to delete module: " << (*it)->getName() << std::endl; delete *it; std::cout << "deleted module\n"; - dlclose(h); - std::cout << "closed handle\n"; + if(h) { + dlclose(h); + std::cout << "closed handle\n"; + } else { + std::cout << "Why no h?\n"; + } } void App::stopModule(decltype(Module::self) it) {