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

@@ -340,7 +340,7 @@ App::DocumentObject* TaskFeaturePick::makeCopy(App::DocumentObject* obj, std::st
App::Property* cprop = *it++;
if( strcmp(prop->getName(), "Label") == 0 ) {
if( prop->getName() && strcmp(prop->getName(), "Label") == 0 ) {
static_cast<App::PropertyString*>(cprop)->setValue(name.c_str());
continue;
}