From 9bfc425b75c013a656e158b2ee032c51efb30451 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 12 Dec 2017 23:27:51 +0100 Subject: [PATCH] Fix assertion when rendering bounding volumes (broken since 6f8b379) --- panda/src/pgraph/cullResult.cxx | 2 ++ panda/src/pgraph/cullTraverser.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraph/cullResult.cxx b/panda/src/pgraph/cullResult.cxx index 53751f07ca..0118888108 100644 --- a/panda/src/pgraph/cullResult.cxx +++ b/panda/src/pgraph/cullResult.cxx @@ -105,6 +105,8 @@ add_object(CullableObject *object, const CullTraverser *traverser) { static const LColor flash_multisample_color(0.78f, 0.05f, 0.81f, 1.0f); static const LColor flash_dual_color(0.92, 0.01f, 0.01f, 1.0f); + nassertv(object->_draw_callback != nullptr || object->_geom != nullptr); + bool force = !traverser->get_effective_incomplete_render(); Thread *current_thread = traverser->get_current_thread(); CullBinManager *bin_manager = CullBinManager::get_global_ptr(); diff --git a/panda/src/pgraph/cullTraverser.cxx b/panda/src/pgraph/cullTraverser.cxx index a796718828..7ed990637b 100644 --- a/panda/src/pgraph/cullTraverser.cxx +++ b/panda/src/pgraph/cullTraverser.cxx @@ -232,7 +232,7 @@ draw_bounding_volume(const BoundingVolume *vol, if (bounds_viz != (Geom *)NULL) { _geoms_pcollector.add_level(2); CullableObject *outer_viz = - new CullableObject(move(bounds_viz), get_bounds_outer_viz_state(), + new CullableObject(bounds_viz, get_bounds_outer_viz_state(), internal_transform); _cull_handler->record_object(outer_viz, this);