Assert fail in tst_usertypes::complexInQml


Recently, -force-asserts option was added to CI developer builds
with -release, see c5ab2fe4fa189f892b6616b743a77b749b6e2511

In result, following assertion problem becomes noticeable:
QFATAL : tst_usertypes::complexInQml(templated nullptr) ASSERT:
"connectionToSource" in file
../qt/qtremoteobjects/src/remoteobjects/qremoteobjectreplica.cpp, line 480.

It triggered, because we tried to acceess child's replica connection,
when it isn't initialized yet.
In the code update I check if child's connection is not null, before
trying to disconnect it.

Pick-to: 6.8
Task-number: QTBUG-130628
Change-Id: I4bc4ec79bcc666126ac3bf22de02106237832f2d
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
commita40dc4c360de47558f1debd25924f9470df8c93b
parent180e9b3aa50e7f6c698a02f5be7d0f58b345732b
authorTatiana Borisova <tatiana.borisova@qt.io>
committerTatiana Borisova <tatiana.borisova@qt.io>
commit timeMon, 4 Nov 2024 08:03:24 +0000