X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_HypothesesUtils.cxx;h=42847411ba21f6d29df4542e7065076733b70973;hb=d2be83be3a939119e4003b50c7fbb874e8a7ba67;hp=7aff8c6ce1b4b281c333e3d19cadf152d9832d07;hpb=c5f8cda9bf008812f728073dd5cc04f6c5082bbb;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 7aff8c6ce..42847411b 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -523,15 +523,20 @@ namespace SMESH if(MYDEBUG) MESSAGE("Loading client meshers plugin library ..."); #ifdef WIN32 #ifdef UNICODE - LPTSTR path = new TCHAR[aClientLibName.length() + 1]; - path[aClientLibName.toWCharArray(path)] = '\0'; + LPTSTR path = new TCHAR[aClientLibName.length() + 1]; + path[aClientLibName.toWCharArray(path)] = '\0'; #else - const char* path = aClientLibName.toUtf8().data(); + QByteArray baPath = aClientLibName.toUtf8(); + const char* path = baPath.data(); #endif #else - char* path = aClientLibName.toUtf8().data(); + QByteArray baPath = aClientLibName.toUtf8(); + char* path = baPath.data(); #endif LibHandle libHandle = LoadLib( path ); +#if defined(WIN32) && defined(UNICODE) + delete path; +#endif if (!libHandle) { // report any error, if occurred {