summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorEnnio Barbaro <enniobarbaro@gmail.com>2015-07-02 23:24:52 +0200
committerEnnio Barbaro <enniobarbaro@gmail.com>2015-07-02 23:24:52 +0200
commit44d0136cb4b532c957d6c037ea6a862a1e371cd9 (patch)
treef11d8ae657faacbacdcc42efd519f9e4e7a140c7 /opentrack
parent67d5b4a3fe4ea89aed3a7a674958c043eb25079d (diff)
Fixed bug crash if dlopen fails
Diffstat (limited to 'opentrack')
-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