diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2011-05-05 13:44:00 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2011-05-05 13:44:00 (GMT) |
commit | d03a28a289cf0665290e6ea0375b31cbb2d6649e (patch) | |
tree | 8625a9c8d362e2004b1edbf58f5367eea0926b60 /src/network/access/qnetworkreplyimpl.cpp | |
parent | 1db1c895259fba1813a2d970d2334a6b35ba4f5d (diff) | |
download | Qt-d03a28a289cf0665290e6ea0375b31cbb2d6649e.zip Qt-d03a28a289cf0665290e6ea0375b31cbb2d6649e.tar.gz Qt-d03a28a289cf0665290e6ea0375b31cbb2d6649e.tar.bz2 |
QNAM: Re-order checks in migrateBackend()
Do the easy checks first, will avoid a crash in the HTTP code
if request is serviced from the cache.
Task-number: QTBUG-18770
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access/qnetworkreplyimpl.cpp')
-rw-r--r-- | src/network/access/qnetworkreplyimpl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 894df79..069755f 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -913,10 +913,6 @@ bool QNetworkReplyImplPrivate::migrateBackend() if (state == Finished || state == Aborted) return true; - // Backend does not support resuming download. - if (!backend->canResume()) - return false; - // Request has outgoing data, not migrating. if (outgoingData) return false; @@ -925,6 +921,10 @@ bool QNetworkReplyImplPrivate::migrateBackend() if (copyDevice) return true; + // Backend does not support resuming download. + if (!backend->canResume()) + return false; + state = QNetworkReplyImplPrivate::Reconnecting; if (backend) { |