mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
(#539) Check for NULL pointer when deciding what kind of range filter collection to use
As the management of override range filter collection is handled independenly from scheduleRedraw, we must check for a valid pointer when trying to access the override range filter
This commit is contained in:
@@ -563,9 +563,8 @@ void RimView::addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCellRangeFilterCollection* RimView::rangeFilterCollection()
|
||||
{
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled())
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled() && m_overrideRangeFilterCollection)
|
||||
{
|
||||
CVF_ASSERT(m_overrideRangeFilterCollection());
|
||||
return m_overrideRangeFilterCollection;
|
||||
}
|
||||
else
|
||||
@@ -579,9 +578,8 @@ RimCellRangeFilterCollection* RimView::rangeFilterCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimCellRangeFilterCollection* RimView::rangeFilterCollection() const
|
||||
{
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled())
|
||||
if (this->viewController() && this->viewController()->isRangeFiltersControlled() && m_overrideRangeFilterCollection)
|
||||
{
|
||||
CVF_ASSERT(m_overrideRangeFilterCollection());
|
||||
return m_overrideRangeFilterCollection;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user