Spreadsheet: getProperty does not return 0 when property is not found, but throws an exception. Handle this instead.
This commit is contained in:
parent
4ab13b9fea
commit
c3af4232a4
|
@ -90,14 +90,16 @@ public:
|
|||
VariableExpression *expr = freecad_dynamic_cast<VariableExpression>(node);
|
||||
|
||||
if (expr) {
|
||||
const App::Property * prop = expr->getProperty();
|
||||
|
||||
if (prop) {
|
||||
try {
|
||||
const App::Property * prop = expr->getProperty();
|
||||
App::DocumentObject * docObj = freecad_dynamic_cast<DocumentObject>(prop->getContainer());
|
||||
|
||||
if (docObj)
|
||||
docDeps.insert(docObj);
|
||||
}
|
||||
catch (const Base::Exception &) {
|
||||
// Ignore this type of exception; it means that the property was not found, which is ok here
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user