Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
ffcf55d9
Commit
ffcf55d9
authored
Feb 07, 2011
by
Peter Eastman
Browse files
Fixed a bug that caused platforms to be registered twice if another plugin linked to them
parent
5b5ddfbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
olla/src/Platform.cpp
olla/src/Platform.cpp
+2
-2
No files found.
olla/src/Platform.cpp
View file @
ffcf55d9
...
@@ -182,7 +182,7 @@ static void initializePlugins(vector<HMODULE>& plugins) {
...
@@ -182,7 +182,7 @@ static void initializePlugins(vector<HMODULE>& plugins) {
}
}
#else
#else
static
void
*
loadOneLibrary
(
const
string
&
file
)
{
static
void
*
loadOneLibrary
(
const
string
&
file
)
{
void
*
handle
=
dlopen
(
file
.
c_str
(),
RTLD_LAZY
|
RTLD_GLOBAL
);
void
*
handle
=
dlopen
(
file
.
c_str
(),
RTLD_LAZY
|
RTLD_GLOBAL
|
RTLD_FIRST
);
if
(
handle
==
NULL
)
if
(
handle
==
NULL
)
throw
OpenMMException
(
"Error loading library "
+
file
+
": "
+
dlerror
());
throw
OpenMMException
(
"Error loading library "
+
file
+
": "
+
dlerror
());
return
handle
;
return
handle
;
...
@@ -249,7 +249,7 @@ vector<string> Platform::loadPluginsFromDirectory(const string& directory) {
...
@@ -249,7 +249,7 @@ vector<string> Platform::loadPluginsFromDirectory(const string& directory) {
try
{
try
{
plugins
.
push_back
(
loadOneLibrary
(
directory
+
dirSeparator
+
files
[
i
]));
plugins
.
push_back
(
loadOneLibrary
(
directory
+
dirSeparator
+
files
[
i
]));
loadedLibraries
.
push_back
(
files
[
i
]);
loadedLibraries
.
push_back
(
files
[
i
]);
}
catch
(
OpenMMException
ex
)
{
}
catch
(
OpenMMException
&
ex
)
{
// Just ignore it.
// Just ignore it.
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment