diff --git a/src/osgUtil/TriStrip_heap_array.h b/src/osgUtil/TriStrip_heap_array.h index 22f5c3fc7..78f8e5e92 100644 --- a/src/osgUtil/TriStrip_heap_array.h +++ b/src/osgUtil/TriStrip_heap_array.h @@ -234,7 +234,10 @@ inline void heap_array::update(size_t i, const T & Elem) { template -inline void heap_array::Adjust(size_t i) { +inline void heap_array::Adjust(size_t i) +{ + if (m_Heap.size()<=1) return; // nothing to swap, so just return. + size_t j; // Check the upper part of the heap