aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlscriptstring.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2023-10-27 14:19:58 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2023-10-31 11:54:10 +0100
commitba6ddfab5bc08db3ae51896a3ec6d8a8d4199c5b (patch)
tree7487c948eec3ecb7847dc3d133a0332a31af9aaf /src/qml/qml/qqmlscriptstring.cpp
parent87d61c4fe35aa115018a28f1bdd8d5c2beca6fe6 (diff)
QQmlScriptString: Guard operator== against nullptr
Amends 015a1ed8e06c92a8dc788ab71f42f1c247e99405. Fixes: QTBUG-118591 Pick-to: 6.6 Change-Id: If6352d689f8c344e5e0c859caf0f52533c665251 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlscriptstring.cpp')
-rw-r--r--src/qml/qml/qqmlscriptstring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlscriptstring.cpp b/src/qml/qml/qqmlscriptstring.cpp
index d263587045..9f47841031 100644
--- a/src/qml/qml/qqmlscriptstring.cpp
+++ b/src/qml/qml/qqmlscriptstring.cpp
@@ -92,7 +92,7 @@ bool QQmlScriptString::operator==(const QQmlScriptString &other) const
{
if (d == other.d)
return true;
- if (!d)
+ if (!d || !other.d)
return false;
if (d->isNumberLiteral || other.d->isNumberLiteral)