From 60b0bd1dd1f1cc5bd9a7c225925ab882783f9e6a Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 9 Sep 2005 14:44:15 +0000 Subject: [PATCH] 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 --- src/unix/gsocket.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.50.0