X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5acec1124566f6e3c16e29f1c29c4ff5e1b88d3a..e6a8416274252fb6ea33800cfce0e4ba0a0542f1:/src/msw/fdrepdlg.cpp diff --git a/src/msw/fdrepdlg.cpp b/src/msw/fdrepdlg.cpp index c1f7176452..61441c2782 100644 --- a/src/msw/fdrepdlg.cpp +++ b/src/msw/fdrepdlg.cpp @@ -310,7 +310,7 @@ wxFindReplaceDialogHookProc(HWND hwnd, FINDREPLACE *pFR = (FINDREPLACE *)lParam; wxFindReplaceDialog *dialog = (wxFindReplaceDialog *)pFR->lCustData; - ::SetWindowText(hwnd, dialog->GetTitle()); + ::SetWindowText(hwnd, dialog->GetTitle().wx_str()); // don't return FALSE from here or the dialog won't be shown return TRUE; @@ -349,20 +349,23 @@ wxFindReplaceDialog::wxFindReplaceDialog(wxWindow *parent, wxFindReplaceDialog::~wxFindReplaceDialog() { - // the dialog might have been already deleted if the user closed it - // manually but in this case we should have got a notification about it and - // the flagmust have been set - if ( !m_impl->WasClosedByUser() ) + if ( m_impl ) { - // if it wasn't, delete the dialog ourselves - if ( !::DestroyWindow(GetHwnd()) ) + // the dialog might have been already deleted if the user closed it + // manually but in this case we should have got a notification about it + // and the flag must have been set + if ( !m_impl->WasClosedByUser() ) { - wxLogLastError(_T("DestroyWindow(find dialog)")); + // if it wasn't, delete the dialog ourselves + if ( !::DestroyWindow(GetHwnd()) ) + { + wxLogLastError(_T("DestroyWindow(find dialog)")); + } } - } - // unsubclass the parent - delete m_impl; + // unsubclass the parent + delete m_impl; + } // prevent the base class dtor from trying to hide us! m_isShown = false;