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

@@ -302,7 +302,7 @@ void Model::slotDeleteObject(const ViewProviderDocumentObject &VPDObjectIn)
void Model::slotChangeObject(const ViewProviderDocumentObject &VPDObjectIn, const App::Property& propertyIn)
{
std::string name("Empty Name");
if (propertyIn.getName()) //getName can return 0.
if (propertyIn.hasName())
name = propertyIn.getName();
assert(!name.empty());