Sketcher: fix free-standing sketches
See forum thread, Sketch support == NULL http://forum.freecadweb.org/viewtopic.php?f=20&t=10942
This commit is contained in:
parent
439f392e88
commit
31e4fd8994
|
@ -82,7 +82,7 @@ void Part2DObject::positionBySupport(void)
|
|||
gp_Pln plane;
|
||||
App::DocumentObject* support = Support.getValue();
|
||||
if (support == NULL)
|
||||
throw Base::Exception("Sketch support has been deleted");
|
||||
return;
|
||||
|
||||
if (support->getTypeId().isDerivedFrom(App::Plane::getClassTypeId())) {
|
||||
// Find the name of the Baseplane without having to access PartDesignGui::BaseplaneNames[]
|
||||
|
|
|
@ -129,10 +129,8 @@ App::DocumentObjectExecReturn *SketchObject::execute(void)
|
|||
{
|
||||
try {
|
||||
App::DocumentObject* support = Support.getValue();
|
||||
if (support == NULL)
|
||||
return new App::DocumentObjectExecReturn("Sketch support has been deleted");
|
||||
|
||||
this->positionBySupport();
|
||||
if (support)
|
||||
this->positionBySupport();
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
return new App::DocumentObjectExecReturn(e.what());
|
||||
|
|
Loading…
Reference in New Issue
Block a user