From 803589ca5a3ff6bfc60740ef841f98ba93cc55ba Mon Sep 17 00:00:00 2001 From: Iliya Katueshenock Date: Tue, 1 Aug 2023 03:53:01 +0200 Subject: [PATCH] Fix #110485: Mesh to curve node incorrect implicit sharing crash Regression caused by 301f13191befb727fe96e8d919798eb07077c017. To share attribute arrays, domain sizes should be the same. Pull Request: https://projects.blender.org/blender/blender/pulls/110487 --- source/blender/geometry/intern/mesh_to_curve_convert.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/geometry/intern/mesh_to_curve_convert.cc b/source/blender/geometry/intern/mesh_to_curve_convert.cc index a7fd29a6eb7..fc401255aa2 100644 --- a/source/blender/geometry/intern/mesh_to_curve_convert.cc +++ b/source/blender/geometry/intern/mesh_to_curve_convert.cc @@ -58,7 +58,9 @@ BLI_NOINLINE bke::CurvesGeometry create_curve_from_vert_indices( curves.cyclic_for_write().slice(cyclic_curves).fill(true); } - const bool share_vert_data = indices_are_full_ordered_copy(vert_indices); + const int src_total_points = mesh_attributes.domain_size(ATTR_DOMAIN_POINT); + const bool share_vert_data = vert_indices.size() == src_total_points && + indices_are_full_ordered_copy(vert_indices); if (share_vert_data) { bke::copy_attributes( mesh_attributes, ATTR_DOMAIN_POINT, propagation_info, {}, curves_attributes);