Fix dynamic_cast problem

fixes #7586
This commit is contained in:
Gunnar Beutner 2014-11-06 09:05:12 +01:00
parent 8bbb2bfb7b
commit 064407d3c9
2 changed files with 2 additions and 3 deletions

View File

@ -330,7 +330,7 @@ Utility::LoadExtensionLibrary(const String& library)
<< boost::errinfo_file_name(path)); << boost::errinfo_file_name(path));
} }
#else /* _WIN32 */ #else /* _WIN32 */
void *hModule = dlopen(path.CStr(), RTLD_NOW); void *hModule = dlopen(path.CStr(), RTLD_NOW | RTLD_GLOBAL);
if (hModule == NULL) { if (hModule == NULL) {
BOOST_THROW_EXCEPTION(std::runtime_error("Could not load library '" + path + "': " + dlerror())); BOOST_THROW_EXCEPTION(std::runtime_error("Could not load library '" + path + "': " + dlerror()));

View File

@ -99,8 +99,7 @@ public:
Object::Ptr object = boost::get<Object::Ptr>(m_Value); Object::Ptr object = boost::get<Object::Ptr>(m_Value);
if (!object) ASSERT(object);
return shared_ptr<T>();
shared_ptr<T> tobject = dynamic_pointer_cast<T>(object); shared_ptr<T> tobject = dynamic_pointer_cast<T>(object);