From 31a4915012b2ba84740bae2e11cea4ee2aeac191 Mon Sep 17 00:00:00 2001 From: Florian Foinant-Willig Date: Mon, 6 May 2024 18:06:27 +0200 Subject: [PATCH] Fix 12755 (#13802) --- src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h index 20fd271ec8..b4ce06aa10 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h @@ -833,6 +833,12 @@ void DSHArcController::addConstraints() } } else { // Valid diagnosis. Must check which constraints may be added. + + // if no curve exists a crash occurs #12755 + if (firstCurve < 0) { + return; + } + auto startpointinfo = handler->getPointInfo(GeoElementId(firstCurve, pos1)); if (x0set && startpointinfo.isXDoF()) {