#4352 Fractures : Make sure appropriate value is always returned

This commit is contained in:
Magne Sjaastad 2019-04-25 08:20:48 +02:00
parent 3cdf19b19d
commit c2fb16a4d3

View File

@ -193,11 +193,9 @@ bool RimWellPathFracture::compareByWellPathNameAndMD(const RimWellPathFracture*
bool RimWellPathFracture::isEnabled() const
{
RimWellPathFractureCollection* fractureCollection = nullptr;
this->firstAncestorOrThisOfType(fractureCollection);
if (fractureCollection)
{
return fractureCollection->isChecked() && isChecked();
}
this->firstAncestorOrThisOfTypeAsserted(fractureCollection);
return fractureCollection->isChecked() && isChecked();
}
//--------------------------------------------------------------------------------------------------