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

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

View File

@@ -551,7 +551,7 @@ QString SelectionView::getProperty(App::DocumentObject* obj) const
App::GeoFeature* geo = static_cast<App::GeoFeature*>(obj);
const App::PropertyComplexGeoData* data = geo->getPropertyOfGeometry();
const char* name = data ? data->getName() : nullptr;
if (name) {
if (App::Property::isValidName(name)) {
property = QString::fromLatin1(name);
}
}