Miscellaneous fixes

This commit is contained in:
jrheinlaender
2013-05-17 20:14:00 +04:30
committed by Stefan Tröger
parent 7be8911b2b
commit 2732f44b42
6 changed files with 14 additions and 12 deletions

View File

@@ -121,6 +121,8 @@ void SketchBased::positionBySketch(void)
Part::Part2DObject *sketch = static_cast<Part::Part2DObject*>(Sketch.getValue());
if (sketch && sketch->getTypeId().isDerivedFrom(Part::Part2DObject::getClassTypeId())) {
App::DocumentObject* support = sketch->Support.getValue();
if (support == NULL)
throw Base::Exception("Sketch with NULL support");
if (support->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
Part::Feature *part = static_cast<Part::Feature*>(support);
this->Placement.setValue(part->Placement.getValue());