PropertExpressionEngine: Ignore dependencies that does not resolve to a document when verifying expressions.
This commit is contained in:
parent
727a06689a
commit
be671259cb
|
@ -656,11 +656,15 @@ std::string PropertyExpressionEngine::validateExpression(const ObjectIdentifier
|
|||
// Get dependencies for the document object pointed to be *j
|
||||
std::vector<DocumentObject*> targets;
|
||||
targets.push_back(docObj);
|
||||
std::vector<DocumentObject*> deps = (*j).getDocument()->getDependencyList(targets);
|
||||
|
||||
for (std::vector<DocumentObject*>::const_iterator i = deps.begin(); i != deps.end(); ++i) {
|
||||
if (*i == pathDocObj)
|
||||
return (*j).toString() + " reference creates a cyclic dependency.";
|
||||
// Does the dependency resolve to a document? If not, ignore it
|
||||
if ((*j).getDocument()) {
|
||||
std::vector<DocumentObject*> deps = (*j).getDocument()->getDependencyList(targets);
|
||||
|
||||
for (std::vector<DocumentObject*>::const_iterator i = deps.begin(); i != deps.end(); ++i) {
|
||||
if (*i == pathDocObj)
|
||||
return (*j).toString() + " reference creates a cyclic dependency.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user