]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
don't create conversion objects unless we really need to convert
[wxWidgets.git] / src / common / filefn.cpp
index f7161adc3fb292e8d0d7de4f99ab9c0bbd491561..4a14615b786209f6af082a6cab24807bef9e7a8e 100644 (file)
@@ -546,7 +546,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
     while ((*d++ = *s) != 0) {
 #  ifndef __WXMSW__
         if (*s == wxT('\\')) {
-            if ((*(d - 1) = *++s)) {
+            if ((*(d - 1) = *++s)!=0) {
                 s++;
                 continue;
             } else
@@ -1968,7 +1968,7 @@ wxFileKind wxGetFileKind(FILE *fp)
     (void)fp;
     return wxFILE_KIND_DISK;
 #else
-    return wxGetFileKind(fileno(fp));
+    return fp ? wxGetFileKind(fileno(fp)) : wxFILE_KIND_UNKNOWN;
 #endif
 }