]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
Changed the "delete win" to the more proper "win->Destroy()" in
[wxWidgets.git] / src / common / socket.cpp
index 06d558dafe222eb08138650cf28283354ebaf854..d8c728b137ecb22beaa5252f0669e2dc404b130b 100644 (file)
@@ -1306,6 +1306,11 @@ extern char wxPanelClassName[];
 LRESULT APIENTRY _EXPORT wxSocketHandlerWndProc(HWND hWnd, UINT message,
    WPARAM wParam, LPARAM lParam)
 {
 LRESULT APIENTRY _EXPORT wxSocketHandlerWndProc(HWND hWnd, UINT message,
    WPARAM wParam, LPARAM lParam)
 {
+  if(message==WM_DESTROY)
+  {
+         ::SetWindowLong(hWnd, GWL_WNDPROC, (LONG) DefWindowProc);
+         return DefWindowProc(hWnd, message, wParam, lParam);
+  }
   wxSocketHandler *h_sock = (wxSocketHandler *)GetWindowLong(hWnd, GWL_USERDATA);
   wxNode *node = h_sock->smsg_list->Find(message);
   wxSocketBase *sock;
   wxSocketHandler *h_sock = (wxSocketHandler *)GetWindowLong(hWnd, GWL_USERDATA);
   wxNode *node = h_sock->smsg_list->Find(message);
   wxSocketBase *sock;