From bce184e87cbb6f68a48d0b896ff72ff5d26df2dd Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 27 Oct 2003 10:29:52 +0000 Subject: [PATCH] Added a check into osg::Sequence::traverse() against an empty sequence, so that a non existant child is not traversed. --- src/osg/Sequence.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osg/Sequence.cpp b/src/osg/Sequence.cpp index c24ffecdb..2d580ddc2 100644 --- a/src/osg/Sequence.cpp +++ b/src/osg/Sequence.cpp @@ -200,7 +200,7 @@ void Sequence::traverse(NodeVisitor& nv) // now do the traversal if (nv.getTraversalMode()==NodeVisitor::TRAVERSE_ACTIVE_CHILDREN) { - if (getValue()>=0) _children[getValue()]->accept(nv); + if (getValue()>=0 && getValue()<(int)_children.size()) _children[getValue()]->accept(nv); } else {