diff options
author | Benjamin C Meyer <ben@meyerhome.net> | 2009-09-01 07:51:56 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-09-01 08:32:11 (GMT) |
commit | 925912ebf552417306a5bd20fd986afda6a582be (patch) | |
tree | d459905a04f1540fef8569d03417647c95a98ef4 /src/network/access/qnetworkaccessbackend.cpp | |
parent | 63e2f5d2c95ece21fd32d0690022b89c38fee865 (diff) | |
download | Qt-925912ebf552417306a5bd20fd986afda6a582be.zip Qt-925912ebf552417306a5bd20fd986afda6a582be.tar.gz Qt-925912ebf552417306a5bd20fd986afda6a582be.tar.bz2 |
QNetworkAccessManager can delete the QAbstractNetworkCache pointer at
any point. Rather then keep a separate pointer to the cache in the
reply use the pointer kept by the manager so the reply never tries
to access a cache pointer that has already been deleted.
Autotest: included
Merge-request: 1124
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/network/access/qnetworkaccessbackend.cpp')
-rw-r--r-- | src/network/access/qnetworkaccessbackend.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp index 615ce7c..947313c 100644 --- a/src/network/access/qnetworkaccessbackend.cpp +++ b/src/network/access/qnetworkaccessbackend.cpp @@ -176,7 +176,9 @@ QList<QNetworkProxy> QNetworkAccessBackend::proxyList() const QAbstractNetworkCache *QNetworkAccessBackend::networkCache() const { - return reply->networkCache; // should be the same as manager->networkCache + if (!manager) + return 0; + return manager->networkCache; } void QNetworkAccessBackend::setCachingEnabled(bool enable) |