Salome HOME
Some corrections related to using UNICODE. rnv/unicode
authorrnv <rnv@opencascade.com>
Thu, 27 Sep 2018 11:34:01 +0000 (14:34 +0300)
committerrnv <rnv@opencascade.com>
Thu, 27 Sep 2018 11:34:01 +0000 (14:34 +0300)
src/MEDWrapper/MED_Factory.cxx
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx

index dbe60c05154886b9b21fe1009e6ca96b19114cd5..3e354c131c4e8cdea033cc7b44c1b608773ccab5 100644 (file)
@@ -55,7 +55,11 @@ namespace MED
 #else
        cosnt char* path = xmlPath.c_str();
 #endif
-    return (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
+       bool res = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
+#ifdef UNICODE
+       delete path;
+#endif
+       return res;
 #else
     return (access(fileName.c_str(), F_OK) == 0);
 #endif
index 255d2f5751554fa993c6a6e571e4c38dd1f64566..42847411ba21f6d29df4542e7065076733b70973 100644 (file)
@@ -534,6 +534,9 @@ namespace SMESH
         char* path = baPath.data();
 #endif
         LibHandle libHandle = LoadLib( path );
+#if defined(WIN32) && defined(UNICODE)
+      delete path;
+#endif
         if (!libHandle) {
           // report any error, if occurred
           {