]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/filedlg.cpp
cleanup - fixed warnings, reformatting
[wxWidgets.git] / src / mac / carbon / filedlg.cpp
index e6fda89c47960c7d96a10ef1156825ffca8e39c1..5e129eaf9119f5e1a75fc228b96fae8fb03376d1 100644 (file)
@@ -173,11 +173,11 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter )
             wxString extension = myData->extensions[i];
 
             // Remove leading '*'
-            if (extension.GetChar(0) == '*')
+            if (extension.length() && (extension.GetChar(0) == '*'))
                 extension = extension.Mid( 1 );
 
             // Remove leading '.'
-            if (extension.GetChar(0) == '.')
+            if (extension.length() && (extension.GetChar(0) == '.'))
                 extension = extension.Mid( 1 );
        
             if (wxFileName::MacFindDefaultTypeAndCreator( extension, &fileType, &creator ))