don't crash when destroying a not initialized socket (patch 1489095)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -335,7 +335,8 @@ void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
|
||||
{
|
||||
/* Remove the socket from the list */
|
||||
EnterCriticalSection(&critical);
|
||||
socketList[(socket->m_msgnumber - WM_USER)] = NULL;
|
||||
if ( socket->IsOk() )
|
||||
socketList[(socket->m_msgnumber - WM_USER)] = NULL;
|
||||
LeaveCriticalSection(&critical);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user