From e15cfd74e8bd19cffbfea723eb583af63e307ad0 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 13 May 2017 21:40:22 +0200 Subject: [PATCH] Prevent assertion when calculating bounds for geom without vertices --- panda/src/gobj/geom.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index 66d7c19e62..2b16a915cd 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -1257,15 +1257,15 @@ compute_internal_bounds(Geom::CData *cdata, Thread *current_thread) const { InternalName::get_vertex(), cdata, current_thread); - nassertv(!pmin.is_nan()); - nassertv(!pmax.is_nan()); - BoundingVolume::BoundsType btype = cdata->_bounds_type; if (btype == BoundingVolume::BT_default) { btype = bounds_type; } if (found_any) { + nassertv(!pmin.is_nan()); + nassertv(!pmax.is_nan()); + // Then we put the bounding volume around both of those points. PN_stdfloat avg_box_area; switch (btype) {