From 5c6869ccc9608efdeaaefadd803232921ad0b1a7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 21 Jan 2008 12:00:10 +0000 Subject: [PATCH] Fixed Geometry::removePrimitiveSet method so that it no longer emits a warning when removing 0 elements form an empty primtive set list. --- src/osg/Geometry.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 4aa44afb0..4193469e3 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -867,7 +867,9 @@ bool Geometry::insertPrimitiveSet(unsigned int i,PrimitiveSet* primitiveset) bool Geometry::removePrimitiveSet(unsigned int i, unsigned int numElementsToRemove) { - if (i<_primitives.size() && numElementsToRemove>0) + if (numElementsToRemove==0) return false; + + if (i<_primitives.size()) { if (i+numElementsToRemove<=_primitives.size()) {