Check if the session is valid before connecting to it
Since there are circumstances where the session is not yet created after start() is called then we should check if the session is valid before connecting to it. Change-Id: I94236f76e4be2433a8c96eb91ce2d4b4d42f2fd9 Reviewed-by: Richard J. Moore <rich@kde.org>bb10
parent
95b1982e47
commit
a91c40868b
|
|
@ -1679,8 +1679,9 @@ void QNetworkReplyHttpImplPrivate::_q_startOperation()
|
|||
#endif
|
||||
} else {
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
QObject::connect(session.data(), SIGNAL(stateChanged(QNetworkSession::State)),
|
||||
q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)), Qt::QueuedConnection);
|
||||
if (session)
|
||||
QObject::connect(session.data(), SIGNAL(stateChanged(QNetworkSession::State)),
|
||||
q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)), Qt::QueuedConnection);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue