diff options
author | BogDan Vatra <bogdan@kdab.com> | 2018-06-23 18:27:48 -0400 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2018-11-27 04:11:23 +0000 |
commit | e4631d1a6aa20dfdd32fff2e3764223435fe427f (patch) | |
tree | dc7569aae55ee4ab280174b9734b78bc37ce245c /src/remoteobjects/qremoteobjectnode.cpp | |
parent | 41ed53bf6603858856124f9e8593b804f4e6d1c8 (diff) |
Handle null QAIM propertyv5.12.0-rc2v5.12.0
Even if a QAIM property is nullptr, we still need to treat it as a
model.
Task-number: QTBUG-71987
Change-Id: Iea8b3bfda88c564c561a7ab6ed293fd0540f5de4
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Diffstat (limited to 'src/remoteobjects/qremoteobjectnode.cpp')
-rw-r--r-- | src/remoteobjects/qremoteobjectnode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/remoteobjects/qremoteobjectnode.cpp b/src/remoteobjects/qremoteobjectnode.cpp index 9163cac..038d68e 100644 --- a/src/remoteobjects/qremoteobjectnode.cpp +++ b/src/remoteobjects/qremoteobjectnode.cpp @@ -1773,9 +1773,9 @@ QVariant QRemoteObjectNodePrivate::handlePointerToQObjectProperty(QConnectedRepl const bool newReplica = !replicas.contains(childInfo.name) || rep->isInitialized(); if (newReplica) { if (rep->isInitialized()) { - auto rep = qSharedPointerCast<QConnectedReplicaImplementation>(replicas.take(childInfo.name)); - if (!rep->isShortCircuit()) - dynamicTypeManager.addFromReplica(static_cast<QConnectedReplicaImplementation *>(rep.data())); + auto childRep = qSharedPointerCast<QConnectedReplicaImplementation>(replicas.take(childInfo.name)); + if (childRep && !childRep->isShortCircuit()) + dynamicTypeManager.addFromReplica(static_cast<QConnectedReplicaImplementation *>(childRep.data())); } if (childInfo.type == ObjectType::CLASS) retval = QVariant::fromValue(q->acquireDynamic(childInfo.name)); |