aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Amland <thomas.amland@gmail.com>2016-03-25 19:47:27 +0100
committerThomas Amland <thomas.amland@gmail.com>2016-03-25 19:47:27 +0100
commit80c4e07f6430d29820926f9ab6977b892d0a8173 (patch)
tree7e417a750587814261afce2cec71ec569d06c979
parent6d79bb7c66d3b03f43c4a0677e7938437ae36e91 (diff)
[contextmenu] dont show menu when there's no buttons
-rw-r--r--xbmc/windows/GUIMediaWindow.cpp3
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;