We have:
...
auto networkSession = getNetworkSession();
...
getNetworkSession() can return non-null pointer even if
networkSessionStrongRef is null:
...
if (networkSessionStrongRef)
return networkSessionStrongRef;
return networkSessionWeakRef.toStrongRef();
....
We check the result:
if (networkSession) {
// here we disconnect signals
}
But we should use the same networkSession when disconnecting,
not start using networkSessionStrongRef suddenly, since it can
be null.
Task-number: QTBUG-57110
Change-Id: I96babb42c2182e741e6eabaf7d1abb88869861f4
Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>