From b4b095ca723ca69d765e9e9957e5741bdc2877d2 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 7 Aug 2013 01:32:36 -0700 Subject: [PATCH] Don't try to get the center of a null bounding box --- apps/openmw/mwrender/animation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 7e1a0aebe..cac19a9ee 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -355,7 +355,8 @@ void Animation::addExtraLight(Ogre::SceneManager *sceneMgr, NifOgre::ObjectList bounds.merge(ent->getBoundingBox()); } - Ogre::SceneNode *node = mInsert->createChildSceneNode(bounds.getCenter()); + Ogre::SceneNode *node = bounds.isFinite() ? mInsert->createChildSceneNode(bounds.getCenter()) + : mInsert->createChildSceneNode(); node->attachObject(olight); } }