diff --git a/std/socket.d b/std/socket.d index 99ac97ac1e3..8e408ad862a 100644 --- a/std/socket.d +++ b/std/socket.d @@ -3510,7 +3510,7 @@ public: if (checkError) checkError.setMinCapacity(n); } - int result = .select(n, fr, fw, fe, &timeout.ctimeval); + int result = .select(n, fr, fw, fe, timeout !is null ? &timeout.ctimeval : null); version (Windows) {