]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dynload.cpp
Added GetStringArray method.
[wxWidgets.git] / src / common / dynload.cpp
index 298b36269032f77e148fe76863118f3116a50408..3b2ff4bf0e336f7a232a66d556f32d229e0687ad 100644 (file)
@@ -192,7 +192,7 @@ wxDllType wxDllLoader::LoadLibrary(const wxString &name)
     {
         wxString msg(_("Failed to load shared library '%s'"));
 #ifdef HAVE_DLERROR
-        wxChar  *err = dlerror();
+        const wxChar  *err = dlerror();
         if( err )
             wxLogError( msg, err );
 #else
@@ -237,7 +237,7 @@ void *wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name, bool *su
     {
         wxString msg(_("wxDllLoader failed to GetSymbol '%s'"));
 #ifdef HAVE_DLERROR
-        wxChar  *err = dlerror();
+        const wxChar *err = dlerror();
         if( err )
         {
             failed = TRUE;
@@ -281,10 +281,12 @@ wxDLManifestEntry::wxDLManifestEntry( const wxString &libname )
 
 wxDLManifestEntry::~wxDLManifestEntry()
 {
-    UnregisterModules();
-    RestoreClassInfo();
-
-    wxDllLoader::UnloadLibrary(m_handle);
+    if( m_handle != 0 )
+    {
+        UnregisterModules();
+        RestoreClassInfo();
+        wxDllLoader::UnloadLibrary(m_handle);
+    }
 }
 
 bool wxDLManifestEntry::UnrefLib()
@@ -460,7 +462,7 @@ wxDLManifestEntry *wxDynamicLibrary::Link(const wxString &libname)
         }
         else
         {
-            wxCHECK_MSG( !entry->UnrefLib(), 0,
+            wxCHECK_MSG( entry->UnrefLib(), 0,
                          _T("Currently linked library is, ..not loaded??") );
             entry = 0;
         }