Skip to content

Commit

Permalink
Avoid crash if displacements are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjenssen committed Jan 7, 2025
1 parent 039d9f0 commit dde369f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ void RivFemPartPartMgr::setDisplacements( bool useDisplacements, double scalingF
m_displacedNodeCoordinates.resize( nodeCount );
const auto coords = m_part->nodes().coordinates;

useDisplacements = useDisplacements && ( displacements.size() == coords.size() );

if ( useDisplacements )
{
for ( size_t i = 0; i < nodeCount; i++ )
Expand Down

0 comments on commit dde369f

Please sign in to comment.