compilation fix for wxUSE_MENUS=0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2008-01-31 21:58:20 +00:00
parent c7d6c56303
commit 3bc9aac036

View File

@@ -317,10 +317,12 @@ wxWindowBase::~wxWindowBase()
// we weren't a dialog class
wxTopLevelWindows.DeleteObject((wxWindow*)this);
#if wxUSE_MENUS
// The associated popup menu can still be alive, disassociate from it in
// this case
if ( wxCurrentPopupMenu && wxCurrentPopupMenu->GetInvokingWindow() == this )
wxCurrentPopupMenu->SetInvokingWindow(NULL);
#endif // wxUSE_MENUS
wxASSERT_MSG( GetChildren().GetCount() == 0, wxT("children not destroyed") );