]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/menu.cpp
compilation fixes - wxGTK compiles but not links
[wxWidgets.git] / src / os2 / menu.cpp
index f6f689e9eb4232940e3c511db7cf3b808a58203d..e307253b9130661983ea2edc3274112a4e6e6cb9 100644 (file)
@@ -389,7 +389,7 @@ bool wxMenu::DoInsertOrAppend(
         //
         // If we're already attached to the menubar, we must update it
         //
-        if (IsAttached())
+        if (IsAttached() && m_menuBar->IsAttached())
         {
             m_menuBar->Refresh();
         }
@@ -460,7 +460,7 @@ wxMenuItem* wxMenu::DoRemove(
                  ,MPFROM2SHORT(pItem->GetId(), TRUE)
                  ,(MPARAM)0
                 );
-    if (IsAttached())
+    if (IsAttached() && m_menuBar->IsAttached())
     {
         //
         // Otherwise, the chane won't be visible