diff options
author | Harald Fernengel <harald.fernengel@nokia.com> | 2010-11-02 15:53:38 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2010-11-02 15:53:38 (GMT) |
commit | 561aeb6b8f7bc4ddb5e6d3e5cbc0ddc9cd344aa9 (patch) | |
tree | bcf9eeb1330a0705974b1cecd12894c2f49b0310 /src/network/kernel | |
parent | c76f883b9c48acea35fe04cfe6dbf5036b224dd2 (diff) | |
download | Qt-561aeb6b8f7bc4ddb5e6d3e5cbc0ddc9cd344aa9.zip Qt-561aeb6b8f7bc4ddb5e6d3e5cbc0ddc9cd344aa9.tar.gz Qt-561aeb6b8f7bc4ddb5e6d3e5cbc0ddc9cd344aa9.tar.bz2 |
Fix crash
check the global network proxy for 0 before dereferencing
Reviewed-by: Robert Griebl
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qnetworkproxy.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index bc5a025..d9d5918 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -426,7 +426,8 @@ template<> void QSharedDataPointer<QNetworkProxyPrivate>::detach() QNetworkProxy::QNetworkProxy() : d(0) { - globalNetworkProxy()->init(); + if (QGlobalNetworkProxy *globalProxy = globalNetworkProxy()) + globalProx->init(); } /*! @@ -441,7 +442,8 @@ QNetworkProxy::QNetworkProxy(ProxyType type, const QString &hostName, quint16 po const QString &user, const QString &password) : d(new QNetworkProxyPrivate(type, hostName, port, user, password)) { - globalNetworkProxy()->init(); + if (QGlobalNetworkProxy *globalProxy = globalNetworkProxy()) + globalProx->init(); } /*! |