1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

macOS: Prevent mac menu bar submenus with empty names being used as the recent items menu

This commit is contained in:
ed 2019-06-18 16:02:25 +01:00
parent 5360191737
commit b0934f896c

View file

@ -249,10 +249,10 @@ public:
}
else if (i.subMenu != nullptr)
{
if (i.text == recentItemsMenuName)
if (recentItemsMenuName.isNotEmpty() && i.text == recentItemsMenuName)
{
if (recent == nullptr)
recent.reset (new RecentFilesMenuItem());
recent = std::make_unique<RecentFilesMenuItem>();
if (recent->recentItem != nil)
{
@ -572,7 +572,7 @@ public:
: oldMenu (MenuBarModel::getMacMainMenu())
{
if (auto* appleMenu = MenuBarModel::getMacExtraAppleItemsMenu())
oldAppleMenu.reset (new PopupMenu (*appleMenu));
oldAppleMenu = std::make_unique<PopupMenu> (*appleMenu);
if (auto* handler = JuceMainMenuHandler::instance)
oldRecentItems = handler->recentItemsMenuName;