X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0ce0f1e9eb40774b86bf50dd05230857d87372b0..8a31648287be0ef976f133de2786b137f1e98340:/src/msw/tooltip.cpp diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp index e9e84c7621..d18525e22b 100644 --- a/src/msw/tooltip.cpp +++ b/src/msw/tooltip.cpp @@ -357,7 +357,7 @@ void wxToolTip::Remove(WXHWND hWnd, unsigned int id, const wxRect& rc) void wxToolTip::DoRemove(WXHWND hWnd) { - if ( hWnd == m_window->GetHWND() ) + if ( m_window && hWnd == m_window->GetHWND() ) { // Remove the tooltip from the main window. Remove(hWnd, m_id, m_rect); @@ -567,15 +567,11 @@ void wxToolTip::DoSetTip(WXHWND hWnd) void wxToolTip::DoForAllWindows(void (wxToolTip::*func)(WXHWND)) { - if ( !m_window ) + if ( m_window ) { - wxASSERT_MSG( !m_others, - wxS("Can't have other windows without the main one.") ); - return; + (this->*func)(m_window->GetHWND()); } - (this->*func)(m_window->GetHWND()); - if ( m_others ) { for ( wxToolTipOtherWindows::const_iterator it = m_others->begin();