m_child->Connect(wxEVT_DESTROY,
wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy),
NULL, this);
- m_focus->Connect(wxEVT_DESTROY,
- wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy),
- NULL, this);
+ if (m_focus)
+ m_focus->Connect(wxEVT_DESTROY,
+ wxWindowDestroyEventHandler(wxPopupTransientWindow::OnDestroy),
+ NULL, this);
}
bool wxPopupTransientWindow::Show( bool show )
if (IsShown() && m_child)
{
wxPoint pos = ScreenToClient(wxGetMousePosition());
- wxRect rect(wxPoint(0,0), GetSize());
+ wxRect rect(GetSize());
if ( rect.Inside(pos) )
{