#14300 Guard flow diagnostics frame access against out-of-range time step

This commit is contained in:
Magne Sjaastad
2026-06-24 11:21:38 +02:00
parent 81f4628fa6
commit de10dcf0de
@@ -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 );