[Sketcher][Bugfix] Fix crash when applying 'Constrain internal alignment' on contraints, fixes #4790

This commit is contained in:
0penBrain
2021-11-22 20:10:08 +01:00
committed by Uwe
parent 4bec2964ed
commit 73ed43d2c1
+4 -4
View File
@@ -6810,13 +6810,13 @@ void CmdSketcherConstrainInternalAlignment::activated(int iMsg)
const Part::Geometry *geo = Obj->getGeometry(GeoId);
if (geo->getTypeId() == Part::GeomPoint::getClassTypeId())
if (geo && geo->getTypeId() == Part::GeomPoint::getClassTypeId())
pointids.push_back(GeoId);
else if (geo->getTypeId() == Part::GeomLineSegment::getClassTypeId())
else if (geo && geo->getTypeId() == Part::GeomLineSegment::getClassTypeId())
lineids.push_back(GeoId);
else if (geo->getTypeId() == Part::GeomEllipse::getClassTypeId())
else if (geo && geo->getTypeId() == Part::GeomEllipse::getClassTypeId())
ellipseids.push_back(GeoId);
else if (geo->getTypeId() == Part::GeomArcOfEllipse::getClassTypeId())
else if (geo && geo->getTypeId() == Part::GeomArcOfEllipse::getClassTypeId())
arcsofellipseids.push_back(GeoId);
else {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),