App: [skip ci] fix Property::isSame() and subclasses by first comparing the pointers directly

This commit is contained in:
wmayer
2022-01-07 17:09:08 +01:00
parent 039d52f01b
commit d3cdd29f5e
7 changed files with 42 additions and 1 deletions

View File

@@ -86,6 +86,8 @@ void PropertyLinkBase::hasSetValue() {
bool PropertyLinkBase::isSame(const Property &other) const
{
if(&other == this)
return true;
if(other.isDerivedFrom(PropertyLinkBase::getClassTypeId())
|| getScope() != static_cast<const PropertyLinkBase*>(&other)->getScope())
return false;