Skip to content

Commit

Permalink
Fixed potential crash when using uninitialized FEMappedValueMat3d.
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMaas1978 committed Sep 19, 2024
1 parent 6665929 commit 022ed95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion FECore/FEMat3dValuator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ FEDataMap* FEMappedValueMat3d::dataMap()

mat3d FEMappedValueMat3d::operator()(const FEMaterialPoint& pt)
{
return m_val->valueMat3d(pt);
assert(m_val);
return (m_val ? m_val->valueMat3d(pt) : mat3d::identity());
}

FEMat3dValuator* FEMappedValueMat3d::copy()
Expand Down

0 comments on commit 022ed95

Please sign in to comment.