]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
for for initializing wxFileName with empty string returning true from IsOk() and...
[wxWidgets.git] / src / common / filename.cpp
index 234ac801380c964f309a0d55bb62e051da451650..99f24f2e1623df970764697b5a332dfcf01a7055 100644 (file)
@@ -427,7 +427,7 @@ void wxFileName::Assign(const wxString& fullpathOrig,
     // always recognize fullpath as directory, even if it doesn't end with a
     // slash
     wxString fullpath = fullpathOrig;
-    if ( !wxEndsWithPathSeparator(fullpath) )
+    if ( !fullpath.empty() && !wxEndsWithPathSeparator(fullpath) )
     {
         fullpath += GetPathSeparator(format);
     }