From e8674fc13d6305fc015511efafa34a89bced4408 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Wed, 16 Dec 2020 14:20:02 +0100 Subject: [PATCH] Sketcher: Fix crash on applying angle constraint on arc ======================================================= The GeoId passed was Constraint::GeoUndef (-2000). Fixes: https://forum.freecadweb.org/viewtopic.php?f=10&t=51716&p=458202#p458160 --- src/Mod/Sketcher/Gui/CommandConstraints.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index 970341f1ea..34dacb6ca6 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -5987,7 +5987,7 @@ void CmdSketcherConstrainAngle::activated(int iMsg) std::swap(PosId1,PosId2); } - if(isBsplinePole(Obj, GeoId1) || isBsplinePole(Obj, GeoId2)) { + if(isBsplinePole(Obj, GeoId1) || (GeoId2 != Constraint::GeoUndef && isBsplinePole(Obj, GeoId2))) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), QObject::tr("Select an edge that is not a B-spline weight")); return;