winrt: do not try to close non existent sockets
Change-Id: I41103db89985f8fbde1faaccaf33c7a76c275f7d Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This commit is contained in:
parent
7e44e4bb4e
commit
9cd7403801
@ -475,9 +475,9 @@ void QNativeSocketEngine::close()
|
||||
Q_D(QNativeSocketEngine);
|
||||
if (d->socketDescriptor != -1) {
|
||||
IClosable *socket = 0;
|
||||
if (d->socketType == QAbstractSocket::TcpSocket)
|
||||
if (d->socketType == QAbstractSocket::TcpSocket && d->tcp)
|
||||
d->tcp->QueryInterface(IID_PPV_ARGS(&socket));
|
||||
else if (d->socketType == QAbstractSocket::UdpSocket)
|
||||
else if (d->socketType == QAbstractSocket::UdpSocket && d->udp)
|
||||
d->udp->QueryInterface(IID_PPV_ARGS(&socket));
|
||||
|
||||
if (socket) {
|
||||
|
Loading…
Reference in New Issue
Block a user