diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-03-02 13:27:52 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-03-02 13:29:25 (GMT) |
commit | 6711f49a6c08c08759cb2185bf202d4b316d33df (patch) | |
tree | c8ad9a2d05dfe4feec8c5b893cf720913f247522 /src | |
parent | daace2df3eb80f1b62f38151f5cc3f3b355927e7 (diff) | |
download | Qt-6711f49a6c08c08759cb2185bf202d4b316d33df.zip Qt-6711f49a6c08c08759cb2185bf202d4b316d33df.tar.gz Qt-6711f49a6c08c08759cb2185bf202d4b316d33df.tar.bz2 |
QNAM HTTP: Fix invoking a method when being destructed right now
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index e92b2f3..806452c 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -681,7 +681,11 @@ void QHttpNetworkConnectionChannel::requeueCurrentlyPipelinedRequests() connection->d_func()->requeueRequest(alreadyPipelinedRequests.at(i)); alreadyPipelinedRequests.clear(); - QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection); + // only run when the QHttpNetworkConnection is not currently being destructed, e.g. + // this function is called from _q_disconnected which is called because + // of ~QHttpNetworkConnectionPrivate + if (qobject_cast<QHttpNetworkConnection*>(connection)) + QMetaObject::invokeMethod(connection, "_q_startNextRequest", Qt::QueuedConnection); } void QHttpNetworkConnectionChannel::eatWhitespace() |