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
Fix crash at study closing. Enable canceling Prism 3D computation
[modules/smesh.git]
/
src
/
SMESHDS
/
SMESHDS_TSubMeshHolder.hxx
diff --git
a/src/SMESHDS/SMESHDS_TSubMeshHolder.hxx
b/src/SMESHDS/SMESHDS_TSubMeshHolder.hxx
index b6fa226da3006dbaf377c5b004ff655652d299d3..52c9eb2c4ba9ada3315e23332504da861587d579 100644
(file)
--- a/
src/SMESHDS/SMESHDS_TSubMeshHolder.hxx
+++ b/
src/SMESHDS/SMESHDS_TSubMeshHolder.hxx
@@
-74,12
+74,20
@@
public:
void DeleteAll()
{
for ( size_t i = 0; i < myVec.size(); ++i )
void DeleteAll()
{
for ( size_t i = 0; i < myVec.size(); ++i )
- delete myVec[i];
+ if ( SUBMESH* sm = myVec[i] )
+ {
+ myVec[i] = 0; // avoid access via Get(i)
+ delete sm;
+ }
myVec.clear();
typename std::map< int, SUBMESH* >::iterator i2sm = myMap.begin();
for ( ; i2sm != myMap.end(); ++i2sm )
myVec.clear();
typename std::map< int, SUBMESH* >::iterator i2sm = myMap.begin();
for ( ; i2sm != myMap.end(); ++i2sm )
- delete i2sm->second;
+ if ( SUBMESH* sm = i2sm->second )
+ {
+ i2sm->second = 0; // avoid access via Get(i)
+ delete sm;
+ }
myMap.clear();
}
int GetMinID() const
myMap.clear();
}
int GetMinID() const