]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/mimetype.cpp
Commit patch [ 1559950 ] fix mem leaks in wx{Dir|File}Dialog
[wxWidgets.git] / src / unix / mimetype.cpp
index 0dc66b58f8742af2fb97266064d0e9fae529969c..e2e68bd09a8ffdabfa24dda23e0aeb15e3c4f2f6 100644 (file)
@@ -280,7 +280,7 @@ void wxMimeTypesManagerImpl::LoadGnomeDataFromKeyFile(const wxString& filename,
 {
     wxTextFile textfile(filename);
 #if defined(__WXGTK20__) && wxUSE_UNICODE
-    if ( !textfile.Open(wxConvUTF8) )
+    if ( !textfile.Open(wxMBConvUTF8(wxMBConvUTF8::MAP_INVALID_UTF8_TO_OCTAL)) )
 #else
     if ( !textfile.Open() )
 #endif
@@ -2643,6 +2643,8 @@ size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& mimetypes)
 
 bool wxMimeTypesManagerImpl::Unassociate(wxFileType *ft)
 {
+    InitIfNeeded();
+
     wxArrayString sMimeTypes;
     ft->GetMimeTypes(sMimeTypes);