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 );