X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7725dc7c0a1daf8116f5d3f2bcf45557a3e7443f..5e80ff3d31fde40c3cef5a3b47d08850d95b5d1a:/src/mac/corefoundation/gsockosx.cpp 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); } }