From: Julian Smart Date: Fri, 9 Sep 2005 14:44:15 +0000 (+0000) Subject: Applied patch [ 1283943 ] Fix crash in GSocket::Select X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/60b0bd1dd1f1cc5bd9a7c225925ab882783f9e6a?ds=inline Applied patch [ 1283943 ] Fix crash in GSocket::Select From Paul Rupe git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/gsocket.cpp b/src/unix/gsocket.cpp index 8e48f63cdf..ac1610a0b8 100644 --- a/src/unix/gsocket.cpp +++ b/src/unix/gsocket.cpp @@ -966,6 +966,9 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags) assert(this); + if (m_fd == -1) + return (GSOCK_LOST_FLAG & flags); + /* Do not use a static struct, Linux can garble it */ tv.tv_sec = m_timeout / 1000; tv.tv_usec = (m_timeout % 1000) * 1000;