Fixed JsonContainer::operator==

This commit is contained in:
Benoit Blanchon
2014-10-13 21:01:11 +02:00
parent 3ae90b66c6
commit 88aed98447
3 changed files with 11 additions and 4 deletions

View File

@ -51,7 +51,9 @@ JsonNode* JsonContainer::createNode()
bool JsonContainer::operator==(const JsonContainer & other) const
{
return _node->getContainerChild() == other._node->getContainerChild();
if (_node == other._node) return true;
if (!_node || !other._node) return false;
return _node->getProxyTarget() == other._node->getProxyTarget();
}
void JsonContainer::addChild(JsonNode* childToAdd)