diff --git a/layout/xul/base/src/nsMenuBarFrame.cpp b/layout/xul/base/src/nsMenuBarFrame.cpp index d72f1175957..8015d670be4 100644 --- a/layout/xul/base/src/nsMenuBarFrame.cpp +++ b/layout/xul/base/src/nsMenuBarFrame.cpp @@ -286,9 +286,11 @@ nsMenuBarFrame::FindMenuWithShortcut(PRUint32 aLetter) // didn't find a matching menu item #ifdef XP_WIN // behavior on Windows - this item is on the menu bar, beep and deactivate the menu bar - nsCOMPtr soundInterface = do_CreateInstance("@mozilla.org/sound;1"); - if (soundInterface) - soundInterface->Beep(); + if (mIsActive) { + nsCOMPtr soundInterface = do_CreateInstance("@mozilla.org/sound;1"); + if (soundInterface) + soundInterface->Beep(); + } DismissChain(); #endif // #ifdef XP_WIN