Skip to content

Commit

Permalink
Prevent crashing with empty wirebox
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Nov 5, 2024
1 parent 1f4def6 commit 197b26a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ogre/src/OgreWireBox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ void OgreWireBox::Create()
this->dataPtr->manualObject->begin(materialName,
Ogre::RenderOperation::OT_LINE_LIST);

if (this->box == math::AxisAlignedBox())
return;

gz::math::Vector3d max = this->box.Max();
gz::math::Vector3d min = this->box.Min();

Expand Down

0 comments on commit 197b26a

Please sign in to comment.