summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-18 12:45:01 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-18 12:45:01 +0200
commit9e3dfb3863c183c3819facc113e953ef154fcd0e (patch)
tree875cff85b090ade98737b2e8c1c7b72fd73d1e84 /source
parentFixed incompatibility to apples c++ compiler... (diff)
downloadcuberite-9e3dfb3863c183c3819facc113e953ef154fcd0e.tar
cuberite-9e3dfb3863c183c3819facc113e953ef154fcd0e.tar.gz
cuberite-9e3dfb3863c183c3819facc113e953ef154fcd0e.tar.bz2
cuberite-9e3dfb3863c183c3819facc113e953ef154fcd0e.tar.lz
cuberite-9e3dfb3863c183c3819facc113e953ef154fcd0e.tar.xz
cuberite-9e3dfb3863c183c3819facc113e953ef154fcd0e.tar.zst
cuberite-9e3dfb3863c183c3819facc113e953ef154fcd0e.zip
Diffstat (limited to 'source')
-rw-r--r--source/cSocketThreads.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/cSocketThreads.cpp b/source/cSocketThreads.cpp
index b27523972..594d5a7d7 100644
--- a/source/cSocketThreads.cpp
+++ b/source/cSocketThreads.cpp
@@ -640,7 +640,8 @@ void cSocketThreads::cSocketThread::WriteToSockets(fd_set * a_Write)
cCSLock Lock(m_Parent->m_CS);
for (int i = m_NumSlots - 1; i >= 0; --i)
{
- if (!FD_ISSET(m_Slots[i].m_Socket->GetSocket(), a_Write))
+ cSocket Socket(*(m_Slots[i].m_Socket));
+ if (!Socket.IsValid() || !FD_ISSET(Socket.GetSocket(), a_Write))
{
continue;
}