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-22 16:17:05 +0100 |
commit | c58d2e5229c39e8007ce5b93822c66af5e765a50 (patch) | |
tree | 41dda4299f2f39e366a5af45780ab23c01913412 /src/qml/qml/qqmlvmemetaobject.cpp | |
parent | e3a2b78cc2488ee247d59209dc53ebbfb785588e (diff) |
QtQml: Recognize JavaScript null as equivalent to nullptr QObject*
Otherwise we can go into infinite recursion there.
Pick-to: 6.2 6.4
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>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-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 6ba75d78bb..36733ee90b 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -891,7 +891,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); |