From: rnv Date: Thu, 27 Sep 2018 11:34:01 +0000 (+0300) Subject: Some corrections related to using UNICODE. X-Git-Tag: V9_2_0a2~10^2~1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8b8b4241036975c907a537d208bac1ab1c945d77;p=modules%2Fsmesh.git Some corrections related to using UNICODE. --- diff --git a/src/MEDWrapper/MED_Factory.cxx b/src/MEDWrapper/MED_Factory.cxx index dbe60c051..3e354c131 100644 --- a/src/MEDWrapper/MED_Factory.cxx +++ b/src/MEDWrapper/MED_Factory.cxx @@ -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 diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 255d2f575..42847411b 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -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 {