]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use fall back if we had already found the MIME type (patch 769826)
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 17 Jul 2003 12:50:04 +0000 (12:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 17 Jul 2003 12:50:04 +0000 (12:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/mimecmn.cpp

index ec98e8097c923002cc62538dea22fb719b78640b..bd85dc0a5860efe9bedbbbd7fa4e2ee23e189c87 100644 (file)
@@ -524,11 +524,11 @@ wxMimeTypesManager::GetFileTypeFromMimeType(const wxString& mimeType)
     EnsureImpl();
     wxFileType *ft = m_impl->GetFileTypeFromMimeType(mimeType);
 
-    if ( ft ) {
+    if ( !ft ) {
         // check the fallbacks
         //
-        // TODO linear search is potentially slow, perhaps we should use a sorted
-        //      array?
+        // TODO linear search is potentially slow, perhaps we should use a
+        //      sorted array?
         size_t count = m_fallbacks.GetCount();
         for ( size_t n = 0; n < count; n++ ) {
             if ( wxMimeTypesManager::IsOfType(mimeType,