X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a5b15da927024adf58063c28c6406965ea9a293..e87d78bb36f371d593137761158118fb09b69fa2:/src/gtk/gnome/gvfs.cpp?ds=sidebyside diff --git a/src/gtk/gnome/gvfs.cpp b/src/gtk/gnome/gvfs.cpp index 17e8bc267f..37c2b6c175 100644 --- a/src/gtk/gnome/gvfs.cpp +++ b/src/gtk/gnome/gvfs.cpp @@ -73,6 +73,12 @@ wxGnomeVFSLibrary::wxGnomeVFSLibrary() wxGnomeVFSLibrary::~wxGnomeVFSLibrary() { + // we crash on exit later (i.e. after main() finishes) if we unload this + // library, apparently it inserts some hooks in other libraries to which we + // link implicitly (GTK+ itself?) which are not uninstalled when it's + // unloaded resulting in this crash, so just leave it in memory -- it's a + // lesser evil + m_libGnomeVFS.Detach(); } bool wxGnomeVFSLibrary::IsOk() @@ -110,18 +116,15 @@ bool wxGnomeVFSMimeTypesManagerImpl::DoAssociation(const wxString& strType, const wxArrayString& strExtensions, const wxString& strDesc) { - int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, true); - - if ( nIndex == wxNOT_FOUND ) - return false; - - if (m_mailcapStylesInited & wxMAILCAP_GNOME) - { - // User modificationt to the MIME database - // are not supported :-) - } - - return false; + return AddToMimeData + ( + strType, + strIcon, + entry, + strExtensions, + strDesc, + true + ) != wxNOT_FOUND; } //----------------------------------------------------------------------------