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
This commit is contained in:
Abdullah Tahiri
2020-12-16 14:20:02 +01:00
parent c158e640d2
commit e8674fc13d

View File

@@ -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;