diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-11-18 16:36:10 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-11-24 13:07:04 +0100 |
commit | 9bfb585cc6029c915d60004b71c681921e61aa19 (patch) | |
tree | c4feec3db87cc55a42b70425773018b1bea97e20 /src | |
parent | 39aba03d4c4bf80a54dbf5b6735b81854dd99220 (diff) |
QtQml: Recognize JavaScript null as equivalent to nullptr QObject*
Otherwise we can go into infinite recursion there.
Fixes: QTBUG-108651
Change-Id: I73a7c524b28d0eacb151f2090e3dce6afbc029d1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c58d2e5229c39e8007ce5b93822c66af5e765a50)
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 0cc26fe0fb..710aadda45 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -896,7 +896,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * QObject *arg = *reinterpret_cast<QObject **>(a[0]); if (const auto *wrap = sv->as<QV4::QObjectWrapper>()) needActivate = wrap->object() != arg; - else + else if (arg != nullptr || !sv->isNull()) needActivate = true; if (needActivate) writeProperty(id, arg); |