mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Check for valid pointer before accessing cell result data
p4#: 21359
This commit is contained in:
@@ -272,7 +272,7 @@ void RimReservoirView::updateViewerWidgetWindowTitle()
|
||||
void RimReservoirView::clampCurrentTimestep()
|
||||
{
|
||||
// Clamp the current timestep to actual possibilities
|
||||
if (this->currentGridCellResults()->cellResults())
|
||||
if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults())
|
||||
{
|
||||
if (m_currentTimeStep() >= static_cast<int>(this->currentGridCellResults()->cellResults()->maxTimeStepCount()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user