Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-12-29 09:16:54 +0300
committerHans Goudey <h.goudey@me.com>2021-12-29 09:16:54 +0300
commitdc0bf9b7027783c3a760cc08286213c59db936f0 (patch)
tree43e68c0a7da965c7ddae10686fdf8e81fb6e6fc6 /source/blender/modifiers/intern/MOD_weld.cc
parentba38b06a97aa12318a04efb5b426a5dd1adabf88 (diff)
Fix T94453: Weld modifier crash after recent cleanup
I had assumed that the span's size was the same as the length variable. In the future, separate lengths could be removed in favor of using lengths directly from spans.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weld.cc')
-rw-r--r--source/blender/modifiers/intern/MOD_weld.cc6
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;