Skip to content

Commit

Permalink
Fix null pointer exception in CMeshObject::GetVolumeData()
Browse files Browse the repository at this point in the history
  • Loading branch information
3dJan committed Apr 8, 2024
1 parent eb14752 commit 51a43e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/API/lib3mf_meshobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ IBeamLattice* CMeshObject::BeamLattice()

IVolumeData * CMeshObject::GetVolumeData()
{
auto volumeData = meshObject()->getVolumeData();
if (!volumeData)
{
return nullptr;
}
return new CVolumeData(std::dynamic_pointer_cast<NMR::CModelResource>(meshObject()->getVolumeData()));
}

Expand Down

0 comments on commit 51a43e2

Please sign in to comment.