diff -durN xine-lib-1-rc4.orig/src/input/input_cdda.c xine-lib-1-rc4/src/input/input_cdda.c --- xine-lib-1-rc4.orig/src/input/input_cdda.c 2004-04-25 21:19:53.000000000 +0200 +++ xine-lib-1-rc4/src/input/input_cdda.c 2004-05-01 22:34:41.000000000 +0200 @@ -1453,7 +1453,7 @@ fflush(stdout); #endif sock = _x_io_tcp_connect(this->stream, this->cddb.server, this->cddb.port); - if (_x_io_tcp_connect_finish(this->stream, sock, CDDB_TIMEOUT) != XIO_READY) { + if (sock == -1 || _x_io_tcp_connect_finish(this->stream, sock, CDDB_TIMEOUT) != XIO_READY) { xine_log(this->stream->xine, XINE_LOG_MSG, _("%s: can't connect to %s:%d\n"), LOG_MODULE, this->cddb.server, this->cddb.port); lprintf("failed\n"); return -1;