mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 13:47:12 -05:00
#14300 Guard flow diagnostics frame access against out-of-range time step
This commit is contained in:
@@ -143,7 +143,7 @@ std::vector<double>* RigFlowDiagResults::findScalarResultFrame( const RigFlowDia
|
||||
{
|
||||
RigFlowDiagResultFrames* resFrames = findScalarResult( resVarAddr );
|
||||
|
||||
if ( resFrames )
|
||||
if ( resFrames && timeStepIndex < resFrames->frameCount() )
|
||||
{
|
||||
std::vector<double>& frame = resFrames->frameData( timeStepIndex );
|
||||
if ( !frame.empty() ) return ( &frame );
|
||||
|
||||
Reference in New Issue
Block a user