diff options
author | Joni Poikelin <joni.poikelin@qt.io> | 2020-09-03 14:22:26 +0300 |
---|---|---|
committer | Joni Poikelin <joni.poikelin@qt.io> | 2020-09-23 08:26:58 +0300 |
commit | 149c1dd07b54ee0c027d94a49d52160dc4f4e2ac (patch) | |
tree | 6ce6e679b87ebf5b29f32d6fc9a581b92b8cae48 /src/qml/qml/qqmlvmemetaobject.cpp | |
parent | feecc5a3206e408023ef0d2cb38d3847c3319dee (diff) |
Prevent crash when destroying asynchronous Loader
Fixes: QTBUG-86255
Pick-to: 5.15
Change-Id: I30488b64d910a1409a43e2e98ee7ab084aec33d2
Reviewed-by: Ulf Hermann <ulf.hermann@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 bf8400f526..2d0f131477 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -259,7 +259,7 @@ void QQmlVMEMetaObjectEndpoint::tryConnect() if (!pd) return; - if (pd->notifyIndex() != -1) + if (pd->notifyIndex() != -1 && ctxt->engine()) connect(target, pd->notifyIndex(), ctxt->engine()); } |