WinRT: Fixed construction of QNativeSocketEngine without parent

Change-Id: If55a8049224a7dceca33a3cf3089d541a3a97b8e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
bb10
Oliver Wolff 2014-09-03 09:20:16 +02:00
parent cd3dece750
commit 365c6e81be
1 changed files with 3 additions and 4 deletions

View File

@ -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)
{
}