X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7725dc7c0a1daf8116f5d3f2bcf45557a3e7443f..053950ae73612200beb95afd1ded05c2f25b24bf:/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); } }