diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index 98308cc88c..1b431f4443 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -175,7 +175,7 @@ wxFrame::~wxFrame() if (wxTheApp->GetExitOnFrameDelete()) { - ::WinPostMsg(GetHWND(), WM_QUIT, 0, 0); + ::WinPostMsg(NULL, WM_QUIT, 0, 0); } } wxModelessWindows.DeleteObject(this); diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 0573448e60..397964640e 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -1881,7 +1881,6 @@ MRESULT wxWindow::OS2WindowProc( case WM_DESTROY: HandleDestroy(); bProcessed = TRUE; - delete this; break; case WM_MOVE: @@ -2426,7 +2425,7 @@ bool wxWindow::OS2Create( wxAssociateWinWithHandle((HWND)m_hWnd ,this ); - // + // // Now need to subclass window. //