Guard streamline update against missing eclipse case

RimStreamlineInViewCollection::findStartCells() dereferences eclipseCase() unchecked. The collection's case pointer can be null while the view's mainGrid() is valid, e.g. during project load before propagateEclipseCaseToChildObjects().

Return early from updateStreamlines() when the case or its data is missing.

Call stack:
[3] RimEclipseCase::eclipseCaseData() at ResInsight/ApplicationLibCode/ProjectDataModel/RimEclipseCase.cpp:197
[4] RimStreamlineInViewCollection::findStartCells(...) at ResInsight/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineInViewCollection.cpp:394
[5] RimStreamlineInViewCollection::updateStreamlines() at ResInsight/ApplicationLibCode/ProjectDataModel/Streamlines/RimStreamlineInViewCollection.cpp:454
[6] RimEclipseView::onUpdateDisplayModelForCurrentTimeStep() at ResInsight/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp:932
[7] Rim3dView::updateDisplayModelForCurrentTimeStepAndRedraw() at ResInsight/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp:723
[8] RiuViewer::setCurrentFrame(int) at ResInsight/ApplicationLibCode/UserInterface/RiuViewer.cpp:1059
[9] RimEclipseView::onCreateDisplayModel() at ResInsight/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp:849
[10] Rim3dView::createDisplayModelAndRedraw() at ResInsight/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp:768
[11] RiaViewRedrawScheduler::updateAndRedrawScheduledViews() at ResInsight/ApplicationLibCode/Application/RiaViewRedrawScheduler.cpp:93
[12] RiaApplication::loadProject(...) at ResInsight/ApplicationLibCode/Application/RiaApplication.cpp:953
This commit is contained in:
Magne Sjaastad committed 2026-10-12 19:00:45 +02:00
1 parent c57864df51
commit 6df07f04f6
1 file changed
+2
@@ -439,6 +439,8 @@ void RimStreamlineInViewCollection::updateStreamlines()
auto mainGrid = eclView->mainGrid();
if ( !mainGrid ) return;
if ( !eclipseCase() || !eclipseCase()->eclipseCaseData() ) return;
if ( m_shouldGenerateTracers && isActive() )
{
// reset generated streamlines