mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
Guard null pointer
This commit is contained in:
parent
4da4a222ca
commit
3bf81b44d5
@ -96,7 +96,8 @@ void RimReservoirCellResultsStorage::setupBeforeSave()
|
||||
bool hasResultsToStore = false;
|
||||
for ( size_t rIdx = 0; rIdx < resAddrs.size(); ++rIdx )
|
||||
{
|
||||
if ( m_cellResults->resultInfo( resAddrs[rIdx] )->needsToBeStored() )
|
||||
auto resInfo = m_cellResults->resultInfo( resAddrs[rIdx] );
|
||||
if ( resInfo && resInfo->needsToBeStored() )
|
||||
{
|
||||
hasResultsToStore = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user