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

@@ -61,9 +61,19 @@ Property::~Property()
}
const char* Property::getName(void) const
const char* Property::getName() const
{
return myName;
return myName ? myName : "";
}
bool Property::hasName() const
{
return isValidName(myName);
}
bool Property::isValidName(const char* name)
{
return name && name[0] != '\0';
}
std::string Property::getFullName() const {