diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index e6b7e6ba5..711ef4595 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -488,7 +488,8 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject) // Remember the label to reuse it then std::list& aFreeLabels = _freeLabels[aDocID]; - aFreeLabels.push_back(aLabel); + if ( aFreeLabels.empty() || aFreeLabels.back() != aLabel ) + aFreeLabels.push_back(aLabel); theObject.Nullify();