mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
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:
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
|
||||
|
||||
Reference in new issue
Block a user