Skip to content

Commit

Permalink
Guard null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Nov 7, 2023
1 parent 4da4a22 commit 3bf81b4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3bf81b4

Please sign in to comment.