diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index a5837cfba93..bd5a476e804 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2956,7 +2956,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, INT ret = 0; TRACE("socket: %04lx, level 0x%x, name 0x%x, ptr %p, len %d\n", - s, level, optname, optval, *optlen); + s, level, optname, optval, optlen ? *optlen : 0); switch(level) {