diff options
author | Ennio Barbaro <enniobarbaro@gmail.com> | 2015-07-02 23:24:52 +0200 |
---|---|---|
committer | Ennio Barbaro <enniobarbaro@gmail.com> | 2015-07-02 23:24:52 +0200 |
commit | 44d0136cb4b532c957d6c037ea6a862a1e371cd9 (patch) | |
tree | f11d8ae657faacbacdcc42efd519f9e4e7a140c7 | |
parent | 67d5b4a3fe4ea89aed3a7a674958c043eb25079d (diff) |
Fixed bug crash if dlopen fails
-rw-r--r-- | opentrack/plugin-support.hpp | 4 |
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 |