summaryrefslogtreecommitdiffhomepage
path: root/opentrack/plugin-support.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack/plugin-support.hpp')
-rw-r--r--opentrack/plugin-support.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/opentrack/plugin-support.hpp b/opentrack/plugin-support.hpp
index bc07c106..95b4b0a1 100644
--- a/opentrack/plugin-support.hpp
+++ b/opentrack/plugin-support.hpp
@@ -115,7 +115,8 @@ struct dylib {
{
fprintf(stderr, "Error, ignoring: %s\n", err);
fflush(stderr);
- dlclose(handle);
+ if (handle)
+ dlclose(handle);
handle = nullptr;
return true;
}
@@ -138,6 +139,7 @@ struct dylib {
return;
} else {
(void) _foo::err(handle);
+ return;
}
#endif