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,6 +335,7 @@ void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
|
|||||||
{
|
{
|
||||||
/* Remove the socket from the list */
|
/* Remove the socket from the list */
|
||||||
EnterCriticalSection(&critical);
|
EnterCriticalSection(&critical);
|
||||||
|
if ( socket->IsOk() )
|
||||||
socketList[(socket->m_msgnumber - WM_USER)] = NULL;
|
socketList[(socket->m_msgnumber - WM_USER)] = NULL;
|
||||||
LeaveCriticalSection(&critical);
|
LeaveCriticalSection(&critical);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user