summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qnativesocketengine_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket/qnativesocketengine_win.cpp')
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index b1c9073eb9..138d046bfc 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -182,7 +182,8 @@ static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, const qt
if (address) {
QHostAddress a;
a.setAddress(tmp);
- a.setScopeId(QString::number(sa6->sin6_scope_id));
+ if (sa6->sin6_scope_id)
+ a.setScopeId(QString::number(sa6->sin6_scope_id));
*address = a;
}
if (port)