Skip to content

Commit 16c9796

Browse files
author
nitrocaster
committed
GameSpy: Prevent assertion failure in GSISocketSelect.
1 parent 7820c59 commit 16c9796

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/xrGameSpy/gamespy/common/gsPlatformSocket.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ int DisableNagle(SOCKET sock)
235235

236236
struct timeval aTimeout = { 0, 0 };
237237

238-
assert(theSocket != INVALID_SOCKET);
238+
if (theSocket == INVALID_SOCKET)
239+
return -1;
239240

240241
// Setup the parameters.
241242
////////////////////////

0 commit comments

Comments
 (0)