mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-12 15:47:27 +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
|
// Elements
|
||||||
set<const SMDS_MeshElement *>::iterator anIter = by->myElements.begin();
|
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())
|
if (myElements.find(*anIter) != myElements.end())
|
||||||
{
|
{
|
||||||
common->myElements.insert(*anIter);
|
common->myElements.insert(*anIter);
|
||||||
myElements.erase(*anIter);
|
myElements.erase(*anIter);
|
||||||
by->myElements.erase(*anIter);
|
by->myElements.erase(anIter++);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
anIter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!common->IsEmpty())
|
if (!common->IsEmpty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user