summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplyimpl.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-09-10 12:40:52 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-09-10 12:55:04 (GMT)
commit77945d775006c296632c293fb320c5308901d5ec (patch)
treeb71e6e86ad4a3041d3407da6c97c954042b5e48b /src/network/access/qnetworkreplyimpl.cpp
parentebc0079ee5fa70564816817a2ea4aecd7ff189db (diff)
downloadQt-77945d775006c296632c293fb320c5308901d5ec.zip
Qt-77945d775006c296632c293fb320c5308901d5ec.tar.gz
Qt-77945d775006c296632c293fb320c5308901d5ec.tar.bz2
Only reset the backend pointer after we're done with it
Since 925912ebf552417306a5bd20fd986afda6a582be QNetworkReplyImplPrivate no longer holds its own pointer to the network cache and relies on the backend to get it. Since the cache is used in our call to finished, we must reset the backend only after that. This fixes a crash I was seeing in Arora... Reviewed-by: Markus Goetz Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access/qnetworkreplyimpl.cpp')
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 29bf238..87dd19a 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -540,10 +540,6 @@ void QNetworkReplyImpl::abort()
return;
// stop both upload and download
- if (d->backend) {
- d->backend->deleteLater();
- d->backend = 0;
- }
if (d->outgoingData)
disconnect(d->outgoingData, 0, this, 0);
if (d->copyDevice)
@@ -557,6 +553,12 @@ void QNetworkReplyImpl::abort()
d->finished();
}
d->state = QNetworkReplyImplPrivate::Aborted;
+
+ // finished may access the backend
+ if (d->backend) {
+ d->backend->deleteLater();
+ d->backend = 0;
+ }
}
void QNetworkReplyImpl::close()