From eccd31472f22d4f847ff5af619e25cfb0c2e3ff3 Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 27 May 2013 16:17:58 -0700 Subject: [PATCH] fix crash when udp not in use --- xwords4/relay/xwrelay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/relay/xwrelay.cpp b/xwords4/relay/xwrelay.cpp index a1dddaa79..41e4e635b 100644 --- a/xwords4/relay/xwrelay.cpp +++ b/xwords4/relay/xwrelay.cpp @@ -1948,7 +1948,7 @@ main( int argc, char** argv ) // run_ctrl_thread( g_control ); --retval; } - if ( FD_ISSET( g_udpsock, &rfds ) ) { + if ( -1 != g_udpsock && FD_ISSET( g_udpsock, &rfds ) ) { // This will need to be done in a separate thread, or pushed // to the existing thread pool handle_udp_packet( g_udpsock );