Handle self-assignment (#1114)

Found with cert-oop54-cpp

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2023-08-15 14:58:56 -07:00 committed by GitHub
parent f69c21c8e6
commit bbb8221301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,6 +183,9 @@ StringList &PropertyMap::unsupportedData()
PropertyMap &PropertyMap::operator=(const PropertyMap &other)
{
if(this == &other)
return *this;
SimplePropertyMap::operator=(other);
*d = *other.d;
return *this;