mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
copy-on-write for _ends array, too
This commit is contained in:
parent
360f0bbaa2
commit
302d80966b
@ -344,6 +344,11 @@ close_primitive() {
|
|||||||
}
|
}
|
||||||
nassertr(num_added >= get_min_num_vertices_per_primitive(), false);
|
nassertr(num_added >= get_min_num_vertices_per_primitive(), false);
|
||||||
#endif
|
#endif
|
||||||
|
if (cdata->_ends.get_ref_count() > 1) {
|
||||||
|
PTA_int new_ends;
|
||||||
|
new_ends.v() = cdata->_ends.v();
|
||||||
|
cdata->_ends = new_ends;
|
||||||
|
}
|
||||||
cdata->_ends.push_back(get_num_vertices());
|
cdata->_ends.push_back(get_num_vertices());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user