diff options
Diffstat (limited to 'opentrack/plugin-support.hpp')
-rw-r--r-- | opentrack/plugin-support.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/opentrack/plugin-support.hpp b/opentrack/plugin-support.hpp index 78443cae..cd7eb528 100644 --- a/opentrack/plugin-support.hpp +++ b/opentrack/plugin-support.hpp @@ -103,7 +103,7 @@ struct dylib { # if defined(__APPLE__) RTLD_LOCAL|RTLD_FIRST|RTLD_NOW # else - RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE + RTLD_LOCAL|RTLD_NOW // XXX RTLD_DEEPBIND on Linux? # endif ); @@ -184,6 +184,14 @@ struct dylib { std::cout.flush(); if (!get_metadata(lib, longName, icon)) continue; + using d = const mem<dylib>&; + if (std::any_of(ret.cbegin(), + ret.cend(), + [&](d a) {return a->type == lib->type && a->name == lib->name;})) + { + qDebug() << "Duplicate lib" << lib->filename; + continue; + } ret.push_back(lib); } } |