From 7bc5ddc6e4313b086af9747178b7b7f64f5f438f Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 22 Jan 2006 13:22:56 +0000 Subject: [PATCH] Applied MIME-types patch. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/mimetype.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index d5ff6698cc..ef010d8bc7 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -2119,8 +2119,9 @@ wxMimeTypesManagerImpl::GetFileTypeFromMimeType(const wxString& mimeType) } if ( index != wxNOT_FOUND ) - { - fileType = new wxFileType; + { // don't throw away fileType that was already found + if ( !fileType) + fileType = new wxFileType; fileType->m_impl->Init(this, index); } return fileType; -- 2.45.2