Merge pull request #490 from torokati44/master

osgDB: Fix handling of return value of loadLibrary in Registry.
This commit is contained in:
OpenSceneGraph git repository 2018-03-02 09:43:24 +00:00 committed by GitHub
commit 31d78b7bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -582,7 +582,7 @@ void Registry::readCommandLine(osg::ArgumentParser& arguments)
std::string value; std::string value;
while(arguments.read("-l",value)) while(arguments.read("-l",value))
{ {
if (loadLibrary(value)!=NOT_LOADED) if (loadLibrary(value)==NOT_LOADED)
{ {
OSG_NOTICE<<"Unable to load library : "<<value<<std::endl; OSG_NOTICE<<"Unable to load library : "<<value<<std::endl;
} }
@ -591,7 +591,7 @@ void Registry::readCommandLine(osg::ArgumentParser& arguments)
while(arguments.read("-e",value)) while(arguments.read("-e",value))
{ {
std::string libName = createLibraryNameForExtension(value); std::string libName = createLibraryNameForExtension(value);
if (loadLibrary(libName)!=NOT_LOADED) if (loadLibrary(libName)==NOT_LOADED)
{ {
OSG_NOTICE<<"Unable to load library : "<<libName<<std::endl; OSG_NOTICE<<"Unable to load library : "<<libName<<std::endl;
} }