#else
 #error One of wxUSE_FILE or wxUSE_FFILE must be set to 1 for wxFSHandler to work
 #endif
-    if ( !is->Ok() )
+    if ( !is->IsOk() )
     {
         delete is;
         return NULL;
     // file urls either start with a forward slash (local harddisk),
     // otherwise they have a servername/sharename notation,
     // which only exists on msw and corresponds to a unc
-    if ( path[0u] == wxT('/') && path [1u] != wxT('/'))
+    if ( path.length() > 1 && (path[0u] == wxT('/') && path [1u] != wxT('/')) )
     {
         path = path.Mid(1);
     }