X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3ca6a5f04692678cd2d9f3ea0843fc3f5a0b254f..493c9f6bb22eef04391998cb1770cf32f1cc6efc:/src/msw/menu.cpp diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 48b0b30706..b35727d9a8 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -273,7 +273,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) #endif // __WIN32__ // if we're already attached to the menubar, we must update it - if ( IsAttached() ) + if ( IsAttached() && m_menuBar->IsAttached() ) { m_menuBar->Refresh(); } @@ -326,7 +326,7 @@ wxMenuItem *wxMenu::DoRemove(wxMenuItem *item) wxLogLastError(wxT("RemoveMenu")); } - if ( IsAttached() ) + if ( IsAttached() && m_menuBar->IsAttached() ) { // otherwise, the chane won't be visible m_menuBar->Refresh();