mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4351 Regression test : Guard null pointer access
This commit is contained in:
@@ -465,15 +465,19 @@ RimWellPathCollection* Rim3dView::wellPathCollection() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Rim3dView::hasVisibleTimeStepDependent3dWellLogCurves() const
|
||||
{
|
||||
std::vector<Rim3dWellLogCurve*> wellLogCurves;
|
||||
wellPathCollection()->descendantsIncludingThisOfType(wellLogCurves);
|
||||
for (const Rim3dWellLogCurve* curve : wellLogCurves)
|
||||
if (wellPathCollection())
|
||||
{
|
||||
if (curve->showInView(this) && curve->isShowingTimeDependentResult())
|
||||
std::vector<Rim3dWellLogCurve*> wellLogCurves;
|
||||
wellPathCollection()->descendantsIncludingThisOfType(wellLogCurves);
|
||||
for (const Rim3dWellLogCurve* curve : wellLogCurves)
|
||||
{
|
||||
return true;
|
||||
if (curve->showInView(this) && curve->isShowingTimeDependentResult())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1717,7 +1717,7 @@ bool RimEclipseView::isTimeStepDependentDataVisible() const
|
||||
if (this->faultResultSettings()->customFaultResult()->isTernarySaturationSelected()) return true;
|
||||
}
|
||||
|
||||
if (this->wellPathCollection()->anyWellsContainingPerforationIntervals()) return true;
|
||||
if (this->wellPathCollection() && this->wellPathCollection()->anyWellsContainingPerforationIntervals()) return true;
|
||||
|
||||
if (this->hasVisibleTimeStepDependent3dWellLogCurves()) return true;
|
||||
|
||||
|
||||
@@ -1638,7 +1638,7 @@ void RiuMainWindow::refreshDrawStyleActions()
|
||||
if (!eclView)
|
||||
{
|
||||
Rim2dIntersectionView* intView = dynamic_cast<Rim2dIntersectionView*>(view);
|
||||
if (intView)
|
||||
if (intView && intView->intersection())
|
||||
{
|
||||
intView->intersection()->firstAncestorOrThisOfType(eclView);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user