summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/json/qjsonvalue.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp
index 1224a24709..deca70c3ea 100644
--- a/src/corelib/json/qjsonvalue.cpp
+++ b/src/corelib/json/qjsonvalue.cpp
@@ -613,8 +613,10 @@ bool QJsonValue::operator==(const QJsonValue &other) const
case Object:
if (base == other.base)
return true;
- if (!base || !other.base)
- return false;
+ if (!base)
+ return !other.base->length;
+ if (!other.base)
+ return !base->length;
return QJsonObject(d, static_cast<QJsonPrivate::Object *>(base))
== QJsonObject(other.d, static_cast<QJsonPrivate::Object *>(other.base));
}