]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpwnd.cpp
fix leak introduced by r53753
[wxWidgets.git] / src / html / helpwnd.cpp
index 78557a7f5d7c9441f702d0e336c01ea71c218c64..778594052f6dc2717def1ee6d9fd920f7a71b62d 100644 (file)
@@ -592,6 +592,9 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id,
 
 wxHtmlHelpWindow::~wxHtmlHelpWindow()
 {
+    if ( m_helpController )
+        m_helpController->SetHelpWindow(NULL);
+
     delete m_mergedIndex;
 
     // PopEventHandler(); // wxhtmlhelpcontroller (not any more!)
@@ -827,6 +830,8 @@ void wxHtmlHelpWindow::DisplayIndexItem(const wxHtmlHelpMergedIndexItem *it)
 bool wxHtmlHelpWindow::KeywordSearch(const wxString& keyword,
                                     wxHelpSearchMode mode)
 {
+    wxCHECK_MSG( !keyword.empty(), false, "must have a non empty keyword" );
+
     if (mode == wxHELP_SEARCH_ALL)
     {
         if ( !(m_SearchList &&