mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Eclipse case: avoid invalidating vector while iterating over it.
This commit is contained in:
parent
abf61090cc
commit
2d688b1c8b
@ -283,11 +283,9 @@ void RimEclipseCase::initAfterRead()
|
||||
{
|
||||
// Move views to view collection.
|
||||
RimEclipseViewCollection* viewColl = viewCollection();
|
||||
for ( size_t j = 0; j < m_reservoirViews_OBSOLETE.size(); j++ )
|
||||
for ( RimEclipseView* riv : m_reservoirViews_OBSOLETE.childrenByType() )
|
||||
{
|
||||
RimEclipseView* riv = m_reservoirViews_OBSOLETE()[j];
|
||||
CVF_ASSERT( riv );
|
||||
|
||||
riv->setEclipseCase( this );
|
||||
m_reservoirViews_OBSOLETE.removeChild( riv );
|
||||
viewColl->addView( riv );
|
||||
|
Loading…
Reference in New Issue
Block a user