From c4317f88f8c9171b7715c3688d8f42141ef7f9af Mon Sep 17 00:00:00 2001 From: "chris jones @ipatch" Date: Wed, 4 Feb 2026 13:26:16 -0600 Subject: [PATCH] sketcher: fixes #27281 fix access out of bounds crash with "remove axes alignment" --- src/Mod/Sketcher/App/SketchObject.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index d1ee015004..816e9e0400 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -5666,9 +5667,10 @@ int SketchObject::removeAxesAlignment(const std::vector& geoIdList) {{Sketcher::Horizontal, GeoEnum::GeoUndef}, {Sketcher::Vertical, GeoEnum::GeoUndef}}; - int cindex = 0; + size_t cindex = 0; for (size_t i = 0; i < constrvals.size(); i++) { - if (i != changeConstraintIndices[cindex].first) { + if (cindex >= changeConstraintIndices.size() + || i != changeConstraintIndices[cindex].first) { newconstrVals.push_back(constrvals[i]); continue; }