]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied MIME-types patch.
authorRobert Roebling <robert@roebling.de>
Sun, 22 Jan 2006 13:22:56 +0000 (13:22 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 22 Jan 2006 13:22:56 +0000 (13:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/mimetype.cpp

index d5ff6698cc49e83c3f2016065428faf011b758cb..ef010d8bc71eef4eed0cd8cbbcec931dd19e288f 100644 (file)
@@ -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;