From: Stefan Csomor Date: Fri, 19 Nov 2004 06:34:47 +0000 (+0000) Subject: apparently this code might be called with a CFSocket not yet constructed, guard again... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ee9a28abee8a08f5b5b658282159a4a6db966173 apparently this code might be called with a CFSocket not yet constructed, guard against NULL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/corefoundation/gsockosx.cpp b/src/mac/corefoundation/gsockosx.cpp index 52e9323347..0d2915900e 100644 --- a/src/mac/corefoundation/gsockosx.cpp +++ b/src/mac/corefoundation/gsockosx.cpp @@ -123,7 +123,8 @@ void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket) struct MacGSocketData *data = (struct MacGSocketData*)(socket->m_gui_dependent); if (data) { - CFRelease(data->socket); + if ( data->socket ) + CFRelease(data->socket); free(data); } }