summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorBenjamin C Meyer <benjamin.meyer@torchmobile.com>2009-04-28 21:59:42 (GMT)
committerPeter Hartmann <peter.hartmann@trolltech.com>2009-04-29 08:26:28 (GMT)
commitb66bb091dced94ab5a587b5370344762d40dbebb (patch)
tree7b9144eb5fa5aa630cad894f652214f673bc70cf /src/network
parent822114e976d7c6644f060ac366c08c92da1a4779 (diff)
downloadQt-b66bb091dced94ab5a587b5370344762d40dbebb.zip
Qt-b66bb091dced94ab5a587b5370344762d40dbebb.tar.gz
Qt-b66bb091dced94ab5a587b5370344762d40dbebb.tar.bz2
QNetworkAccessManager: do not segfault when using a network cache
Don't setfault when setting 0 for the network cache such as when you want to disable it. Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 11e1e46..bcbeef1 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -477,7 +477,8 @@ void QNetworkAccessManager::setCache(QAbstractNetworkCache *cache)
if (d->networkCache != cache) {
delete d->networkCache;
d->networkCache = cache;
- d->networkCache->setParent(this);
+ if (d->networkCache)
+ d->networkCache->setParent(this);
}
}