mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
Guard null pointer
This commit is contained in:
1 parent
4da4a222ca
commit
3bf81b44d5
1 file changed
+2
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user