mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
In Split(), fix removal from a set being iterated, leading to exception at study restoration if there are intersecting groups
This commit is contained in:
parent
72598d1788
commit
71bc953009
@ -350,14 +350,16 @@ void DriverMED_Family::Split (DriverMED_FamilyPtr by,
|
||||
{
|
||||
// Elements
|
||||
set<const SMDS_MeshElement *>::iterator anIter = by->myElements.begin();
|
||||
for (; anIter != by->myElements.end(); anIter++)
|
||||
while ( anIter != by->myElements.end())
|
||||
{
|
||||
if (myElements.find(*anIter) != myElements.end())
|
||||
{
|
||||
common->myElements.insert(*anIter);
|
||||
myElements.erase(*anIter);
|
||||
by->myElements.erase(*anIter);
|
||||
by->myElements.erase(anIter++);
|
||||
}
|
||||
else
|
||||
anIter++;
|
||||
}
|
||||
|
||||
if (!common->IsEmpty())
|
||||
|
Loading…
Reference in New Issue
Block a user