diff options
author | tamland <thomas.amland@gmail.com> | 2016-03-26 12:21:20 +0100 |
---|---|---|
committer | tamland <thomas.amland@gmail.com> | 2016-03-26 12:21:20 +0100 |
commit | 7107ab5463d604b50369af7035deec572c4af3da (patch) | |
tree | 5d332da7597b88a84c5ed46c0e5ad324e686ae5d | |
parent | 297cc4ee78eddab82991e7091aaf5ef9c0b92d17 (diff) | |
parent | 80c4e07f6430d29820926f9ab6977b892d0a8173 (diff) |
Merge pull request #9451 from tamland/fix_empty_context_menu
[contextmenu] dont show menu when there's no buttons
-rw-r--r-- | xbmc/windows/GUIMediaWindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xbmc/windows/GUIMediaWindow.cpp b/xbmc/windows/GUIMediaWindow.cpp index 7177a2f35b..521ece78c4 100644 --- a/xbmc/windows/GUIMediaWindow.cpp +++ b/xbmc/windows/GUIMediaWindow.cpp @@ -1545,6 +1545,9 @@ bool CGUIMediaWindow::OnPopupMenu(int itemIdx) for (const auto& menu : addonItems) buttons.emplace_back(-buttons.size(), menu->GetLabel(*item)); + if (buttons.empty()) + return true; + int idx = CGUIDialogContextMenu::Show(buttons); if (idx < 0 || idx >= buttons.size()) return false; |