summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-04-26 15:05:46 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-04-26 15:23:28 (GMT)
commitc3067851071ae9480688e0d746dd6b03bd113823 (patch)
tree9c6bea8a02346a36065949831e2e96ed08810408 /src/network
parent2e95891d29cb115dfadd57076e215030cd255489 (diff)
downloadQt-c3067851071ae9480688e0d746dd6b03bd113823.zip
Qt-c3067851071ae9480688e0d746dd6b03bd113823.tar.gz
Qt-c3067851071ae9480688e0d746dd6b03bd113823.tar.bz2
QNAM HTTP: Fix invoking a method when being destructed right now (2)
Task-number: QTBUG-10171 Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index f1c51bc..22dd5cb 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -317,6 +317,13 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
return;
}
+ // 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)) {
+ return;
+ }
+
qint64 bytes = 0;
QAbstractSocket::SocketState socketState = socket->state();