From 9035b4a6105fe383ab7091104f7a238c4594b70b Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 19 Dec 2018 20:56:42 +0100 Subject: [PATCH] pgraph: don't bother calling xform() on empty BoundingVolume --- panda/src/pgraph/pandaNode.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/panda/src/pgraph/pandaNode.cxx b/panda/src/pgraph/pandaNode.cxx index 1e3d427e28..25a65e19ae 100644 --- a/panda/src/pgraph/pandaNode.cxx +++ b/panda/src/pgraph/pandaNode.cxx @@ -3514,12 +3514,12 @@ update_cached(bool update_bounds, int pipeline_stage, PandaNode::CDLockedStageRe const BoundingVolume **child_begin = &child_volumes[0]; const BoundingVolume **child_end = child_begin + child_volumes_i; ((BoundingVolume *)gbv)->around(child_begin, child_end); - } - // If we have a transform, apply it to the bounding volume we just - // computed. - if (!transform->is_identity()) { - gbv->xform(transform->get_mat()); + // If we have a transform, apply it to the bounding volume we just + // computed. + if (!transform->is_identity()) { + gbv->xform(transform->get_mat()); + } } cdataw->_external_bounds = gbv;