#include "wx/busyinfo.h"
 #include "wx/html/helpctrl.h"
-#include "wx/html/helpwin.h"
+#include "wx/html/helpwnd.h"
 #include "wx/html/helpfrm.h"
 #include "wx/html/helpdlg.h"
 
     wxHelpControllerBase(parentWindow)
 {
     m_helpWindow = NULL;
+    m_helpFrame = NULL;
+    m_helpDialog = NULL;
     m_Config = NULL;
     m_ConfigRoot = wxEmptyString;
     m_titleFormat = _("Help: %s");
         parent->Destroy();
         m_helpWindow = NULL;
     }
+    m_helpDialog = NULL;
+    m_helpFrame = NULL;
 }
 
 void wxHtmlHelpController::OnCloseFrame(wxCloseEvent& evt)
 
     m_helpWindow->SetController(NULL);
     m_helpWindow = NULL;
+    m_helpDialog = NULL;
+    m_helpFrame = NULL;
 }
 
 void wxHtmlHelpController::SetTitleFormat(const wxString& title)
     frame->SetController(this);
     frame->SetTitleFormat(m_titleFormat);    
     frame->Create(m_parentWindow, -1, wxEmptyString, m_FrameStyle);
+    m_helpFrame = frame;
     return frame;
 }
 
     dialog->SetController(this);
     dialog->SetTitleFormat(m_titleFormat);    
     dialog->Create(m_parentWindow, -1, wxEmptyString, m_FrameStyle);
+    m_helpDialog = dialog;
     return dialog;
 }