App: Bugfix for NULL-Pointer dereference of Property->getName()

This commit is contained in:
wmayer
2022-01-16 14:30:51 +01:00
parent 8525033bcc
commit b35623e680
14 changed files with 40 additions and 16 deletions

View File

@@ -180,7 +180,7 @@ void DocumentObjectT::operator=(const DocumentObject* obj)
}
void DocumentObjectT::operator=(const Property *prop) {
if(!prop || !prop->getName()
if(!prop || !prop->hasName()
|| !prop->getContainer()
|| !prop->getContainer()->isDerivedFrom(App::DocumentObject::getClassTypeId()))
{