diff options
-rw-r--r-- | source/blender/modifiers/intern/MOD_weld.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_weld.cc b/source/blender/modifiers/intern/MOD_weld.cc index 097ed26afb3..1f7783f8b28 100644 --- a/source/blender/modifiers/intern/MOD_weld.cc +++ b/source/blender/modifiers/intern/MOD_weld.cc @@ -1040,9 +1040,9 @@ static void weld_poly_loop_ctx_setup(Span<MLoop> mloop, if (remain_edge_ctx_len) { - /* Setup Poly/Loop. */ - - for (WeldPoly &wp : wpoly) { + /* Setup Poly/Loop. Note that `wpoly_len` may be different than `wpoly.size()` here. */ + for (const int i : IndexRange(wpoly_len)) { + WeldPoly &wp = wpoly[i]; const int ctx_loops_len = wp.loops.len; const int ctx_loops_ofs = wp.loops.ofs; |