]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/corefoundation/gsockosx.cpp
wxPaletteBase introduction. wxPalette::GetColoursCount() in interface of all platform...
[wxWidgets.git] / src / mac / corefoundation / gsockosx.cpp
index 52e93233471631ee464d3c4a7baa4d85a2f30702..628cf4778614f42c82a6e2f2f9d7d046a1414bca 100644 (file)
@@ -123,7 +123,10 @@ void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
     struct MacGSocketData *data = (struct MacGSocketData*)(socket->m_gui_dependent);
     if (data)
     {
-        CFRelease(data->socket);
+        if ( data->source )
+            CFRelease(data->source);
+        if ( data->socket )
+            CFRelease(data->socket);
         free(data);
     }
 }