diff options
author | Bret Curtis <psi29a@gmail.com> | 2022-03-31 21:55:14 +0200 |
---|---|---|
committer | Bret Curtis <psi29a@gmail.com> | 2022-03-31 21:55:14 +0200 |
commit | 5c81fdee38932a7276cbf828b2397215f811f688 (patch) | |
tree | a8e2b5cb0b11f67c263f912842941ae15332955b | |
parent | ad429009b120e384d4d5a21b6c835f1f90def509 (diff) |
check that the index is now -1; otherwise bad things happenNiFltAnimationNode
-rw-r--r-- | apps/openmw/mwrender/objectpaging.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/openmw/mwrender/objectpaging.cpp b/apps/openmw/mwrender/objectpaging.cpp index 57040eca98..d2b66b78d9 100644 --- a/apps/openmw/mwrender/objectpaging.cpp +++ b/apps/openmw/mwrender/objectpaging.cpp @@ -155,7 +155,7 @@ namespace MWRender if (const osg::Sequence* sq = dynamic_cast<const osg::Sequence*>(node)) { osg::Group* n = new osg::Group; - n->addChild(operator()(sq->getChild(sq->getValue()))); + n->addChild(operator()(sq->getChild(sq->getValue() != -1 ? sq->getValue() : 0))); n->setDataVariance(osg::Object::STATIC); return n; } @@ -310,7 +310,7 @@ namespace MWRender } if (osg::Sequence* sq = dynamic_cast<osg::Sequence*>(&node)) { - traverse(*sq->getChild(sq->getValue())); + traverse(*sq->getChild(sq->getValue() != -1 ? sq->getValue() : 0)); return; } |