Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bos #19219 [CEA] SIGSEGV when right-click in the view in 3D layers dialog box
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_HypothesesUtils.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
index 7aff8c6ce1b4b281c333e3d19cadf152d9832d07..9c67829795d66199da13d8278d4c0025785724ad 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
+++ b/
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
20
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-67,6
+67,7
@@
#define LoadLib( name ) LoadLibrary( name )
#define GetProc GetProcAddress
#define UnLoadLib( handle ) FreeLibrary( handle );
#define LoadLib( name ) LoadLibrary( name )
#define GetProc GetProcAddress
#define UnLoadLib( handle ) FreeLibrary( handle );
+ #define env_sep ";"
#else // WIN32
#define LibHandle void*
#ifdef DYNLOAD_LOCAL
#else // WIN32
#define LibHandle void*
#ifdef DYNLOAD_LOCAL
@@
-76,6
+77,7
@@
#endif // DYNLOAD_LOCAL
#define GetProc dlsym
#define UnLoadLib( handle ) dlclose( handle );
#endif // DYNLOAD_LOCAL
#define GetProc dlsym
#define UnLoadLib( handle ) dlclose( handle );
+ #define env_sep ":"
#endif // WIN32
#ifdef _DEBUG_
#endif // WIN32
#ifdef _DEBUG_
@@
-197,7
+199,7
@@
namespace SMESH
if (cenv)
HypsXml.sprintf("%s", cenv);
if (cenv)
HypsXml.sprintf("%s", cenv);
- QStringList HypsXmlList = HypsXml.split(
":"
, QString::SkipEmptyParts);
+ QStringList HypsXmlList = HypsXml.split(
env_sep
, QString::SkipEmptyParts);
if (HypsXmlList.count() == 0) {
SUIT_MessageBox::critical(SMESHGUI::desktop(),
QObject::tr("SMESH_WRN_WARNING"),
if (HypsXmlList.count() == 0) {
SUIT_MessageBox::critical(SMESHGUI::desktop(),
QObject::tr("SMESH_WRN_WARNING"),
@@
-329,8
+331,7
@@
namespace SMESH
hypoSet != myListOfHypothesesSets.end();
++hypoSet ) {
HypothesesSet* aSet = *hypoSet;
hypoSet != myListOfHypothesesSets.end();
++hypoSet ) {
HypothesesSet* aSet = *hypoSet;
- if ( aSet && ( aSet->count( true ) || aSet->count( false )) &&
- aSet->maxDim() <= maxDim)
+ if ( aSet && 0 <= aSet->maxDim() && aSet->maxDim() <= maxDim )
{
aSetNameList.append( mangledHypoSetName( aSet ));
}
{
aSetNameList.append( mangledHypoSetName( aSet ));
}
@@
-523,15
+524,20
@@
namespace SMESH
if(MYDEBUG) MESSAGE("Loading client meshers plugin library ...");
#ifdef WIN32
#ifdef UNICODE
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
#else
- const char* path = aClientLibName.toUtf8().data();
+ QByteArray baPath = aClientLibName.toUtf8();
+ const char* path = baPath.data();
#endif
#else
#endif
#else
- char* path = aClientLibName.toUtf8().data();
+ QByteArray baPath = aClientLibName.toUtf8();
+ char* path = baPath.data();
#endif
LibHandle libHandle = LoadLib( path );
#endif
LibHandle libHandle = LoadLib( path );
+#if defined(WIN32) && defined(UNICODE)
+ delete path;
+#endif
if (!libHandle) {
// report any error, if occurred
{
if (!libHandle) {
// report any error, if occurred
{
@@
-663,7
+669,7
@@
namespace SMESH
int res = SMESH::HYP_UNKNOWN_FATAL;
SUIT_OverrideCursor wc;
int res = SMESH::HYP_UNKNOWN_FATAL;
SUIT_OverrideCursor wc;
- if (
!aSubMesh->_is_nil() && ! aHyp->_is_nil()
) {
+ if (
!aSubMesh->_is_nil() && !aHyp->_is_nil()
) {
try {
SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
_PTR(SObject) SsubM = SMESH::FindSObject(aSubMesh);
try {
SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
_PTR(SObject) SsubM = SMESH::FindSObject(aSubMesh);