From 197b26a9a17ba9dd5e8a48f7e4567227f79fc862 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 5 Nov 2024 18:23:15 +0000 Subject: [PATCH] Prevent crashing with empty wirebox Signed-off-by: Ian Chen --- ogre/src/OgreWireBox.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ogre/src/OgreWireBox.cc b/ogre/src/OgreWireBox.cc index e44c064ba..c365b4fef 100644 --- a/ogre/src/OgreWireBox.cc +++ b/ogre/src/OgreWireBox.cc @@ -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();