#4351 Regression test : Guard null pointer access

This commit is contained in:
Magne Sjaastad
2019-04-24 07:41:11 +02:00
parent 195fc85a5a
commit 5123d5d0c5
3 changed files with 11 additions and 7 deletions

View File

@@ -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;
}