From ee9a28abee8a08f5b5b658282159a4a6db966173 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 19 Nov 2004 06:34:47 +0000 Subject: [PATCH] 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 --- src/mac/corefoundation/gsockosx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } -- 2.50.0