Salome HOME
Fix crash (found by make installcheck) - temporary solution
[modules/smesh.git] / src / SMESH_I / SMESH_MeshEditor_i.cxx
index 25750af0e18455154c9a3509ce6dee5a9cd8cbf3..4683044f5f9bf7c2abafae3986f1e1d01cac9728 100644 (file)
@@ -745,8 +745,10 @@ struct SMESH_MeshEditor_i::_IDSource : public POA_SMESH::SMESH_IDSource
 SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::long_array& ids,
                                                            SMESH::ElementType       type)
 {
-  if ( myAuxIDSources.size() > 10 )
-    deleteAuxIDSources();
+  if ( myAuxIDSources.size() > 10 ) {
+    delete myAuxIDSources.front();
+    myAuxIDSources.pop_front();
+  }
 
   _IDSource* idSrc = new _IDSource;
   idSrc->_mesh = myMesh_i->_this();