summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2014-09-03 09:20:16 +0200
committerOliver Wolff <oliver.wolff@digia.com>2014-09-03 09:33:23 +0200
commit365c6e81be0f09cf92ec4ed5a62f9951517859e7 (patch)
treee7701b0b9b6aff2c5d8e46e5d2c0c41d485d3419 /src/network
parentcd3dece750aa30b15091f211a72b6fcf67d49853 (diff)
WinRT: Fixed construction of QNativeSocketEngine without parent
Change-Id: If55a8049224a7dceca33a3cf3089d541a3a97b8e Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qnativesocketengine_winrt.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/network/socket/qnativesocketengine_winrt.cpp b/src/network/socket/qnativesocketengine_winrt.cpp
index 2ea6d6e015..62b067750c 100644
--- a/src/network/socket/qnativesocketengine_winrt.cpp
+++ b/src/network/socket/qnativesocketengine_winrt.cpp
@@ -176,10 +176,8 @@ QNativeSocketEngine::QNativeSocketEngine(QObject *parent)
{
#ifndef QT_NO_SSL
Q_D(QNativeSocketEngine);
- Q_ASSERT(parent);
- d->sslSocket = qobject_cast<QSslSocket *>(parent->parent());
-#else
- d->sslSocket = Q_NULLPTR;
+ if (parent)
+ d->sslSocket = qobject_cast<QSslSocket *>(parent->parent());
#endif
connect(this, SIGNAL(connectionReady()), SLOT(connectionNotification()), Qt::QueuedConnection);
@@ -827,6 +825,7 @@ QNativeSocketEnginePrivate::QNativeSocketEnginePrivate()
, notifyOnException(false)
, closingDown(false)
, socketDescriptor(-1)
+ , sslSocket(Q_NULLPTR)
{
}