From 23232a5b20b39a0209805d8e4b7bdfdbdcd795b7 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 15 Jul 2019 19:41:07 +0200 Subject: [PATCH] pgraphnodes: fix assert when analyzing geoms with strip cut index --- panda/src/pgraphnodes/sceneGraphAnalyzer.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraphnodes/sceneGraphAnalyzer.cxx b/panda/src/pgraphnodes/sceneGraphAnalyzer.cxx index 915845af86..9a71530919 100644 --- a/panda/src/pgraphnodes/sceneGraphAnalyzer.cxx +++ b/panda/src/pgraphnodes/sceneGraphAnalyzer.cxx @@ -425,8 +425,12 @@ collect_statistics(const Geom *geom) { CPT(GeomPrimitive) prim = geom->get_primitive(i); int num_vertices = prim->get_num_vertices(); + int strip_cut_index = prim->get_strip_cut_index(); for (int vi = 0; vi < num_vertices; ++vi) { - tracker._referenced_vertices.set_bit(prim->get_vertex(vi)); + int index = prim->get_vertex(vi); + if (index != strip_cut_index) { + tracker._referenced_vertices.set_bit(index); + } } if (prim->is_indexed()) {