Fix segfault on missing Anchor view
- test script did not create Anchor(Front) view. DPG/DVP did not handle missing Anchor properly
This commit is contained in:
@@ -239,10 +239,18 @@ App::DocumentObjectExecReturn *DrawViewPart::execute(void)
|
||||
if (!keepUpdated()) {
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
const std::vector<App::DocumentObject*>& links = Source.getValues();
|
||||
if (links.empty()) {
|
||||
Base::Console().Log("DVP::execute - %s - No Sources - creation time?\n",getNameInDocument());
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
TopoDS_Shape shape = getSourceShape();
|
||||
TopoDS_Shape shape = getSourceShape(); //if shape is null, it is probably obj creation time.
|
||||
if (shape.IsNull()) {
|
||||
return new App::DocumentObjectExecReturn("DVP - Linked shape object is invalid");
|
||||
Base::Console().Log("DVP::execute - %s - source shape is invalid - creation time?\n",
|
||||
getNameInDocument());
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
gp_Pnt inputCenter;
|
||||
|
||||
Reference in New Issue
Block a user