Measure: Fix crash when removing referenced element

Also improve error messages
Fixes #16183
This commit is contained in:
hlorus
2024-09-02 11:20:21 +02:00
committed by WandererFan
parent 6ef51daec1
commit b07b257542
9 changed files with 27 additions and 36 deletions

View File

@@ -116,6 +116,10 @@ public:
// Resolve App::Link
App::DocumentObject* sub = subObjT.getSubObject();
if (!sub) {
return nullptr;
}
if (sub->isDerivedFrom<App::Link>()) {
auto link = static_cast<App::Link*>(sub);
sub = link->getLinkedObject(true);