From f4ab32f5bcb3631194f3a16790265555a81fe7ff Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 14 Mar 2025 23:27:35 -0500 Subject: [PATCH] check dlerror --- src/App.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App.cpp b/src/App.cpp index ba3fa80..742dc20 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -85,12 +85,13 @@ 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"; - if(h) { + char* mesg = dlerror(); + if(h && !mesg) { std::cout << "h: " << h << " attempting to dlclose\n"; dlclose(h); std::cout << "closed handle\n"; } else { - std::cout << "Why no h?\n"; + std::cout << "error: " << mesg << "\n"; } }