0001013: 0.13 program crash

This commit is contained in:
wmayer
2013-02-17 08:43:21 +01:00
parent de1ef5cff0
commit 3d7f7d5468

View File

@@ -197,6 +197,8 @@ const TopoDS_Face SketchBased::getSupportFace() const {
Part::Feature* SketchBased::getSupport() const {
// get the support of the Sketch if any
if (!Sketch.getValue())
return 0;
App::DocumentObject* SupportLink = static_cast<Part::Part2DObject*>(Sketch.getValue())->Support.getValue();
Part::Feature* SupportObject = NULL;
if (SupportLink && SupportLink->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))