X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad41e209075bf049c135595a117987a896014fdd..6f207e66993d3a53cdd6c3d6350bf1b1822ecad4:/src/unix/dlunix.cpp diff --git a/src/unix/dlunix.cpp b/src/unix/dlunix.cpp index efe3f7e2ef..97d20f98ee 100644 --- a/src/unix/dlunix.cpp +++ b/src/unix/dlunix.cpp @@ -271,14 +271,12 @@ void *wxDynamicLibrary::RawGetSymbol(wxDllType handle, const wxString& name) /* static */ void wxDynamicLibrary::Error() { -#if wxUSE_UNICODE - wxWCharBuffer buffer = wxConvLocal.cMB2WC( dlerror() ); - const wxChar *err = buffer; -#else - const wxChar *err = dlerror(); -#endif + wxString err(dlerror()); + + if ( err.empty() ) + err = _("Unknown dynamic library error"); - wxLogError(wxT("%s"), err ? err : _("Unknown dynamic library error")); + wxLogError(wxT("%s"), err); } #endif // wxHAVE_DYNLIB_ERROR