Skip to content
Browse files

gui: don't allow context menu recursion

Could happen if a button was directly mapped to a context menu.
  • Loading branch information...
1 parent 64ff0ab commit c67f97ae90d52a290e02f27571bf240f00b759c7 @elupus committed Oct 29, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 xbmc/dialogs/GUIDialogContextMenu.cpp
View
3 xbmc/dialogs/GUIDialogContextMenu.cpp
@@ -766,6 +766,9 @@ int CGUIDialogContextMenu::ShowAndGetChoice(const CContextButtons &choices)
CGUIDialogContextMenu *pMenu = (CGUIDialogContextMenu *)g_windowManager.GetWindow(WINDOW_DIALOG_CONTEXT_MENU);
if (pMenu)
{
+ if (pMenu->IsDialogRunning())
+ return -1;
+
pMenu->m_buttons = choices;
pMenu->Initialize();
pMenu->SetInitialVisibility();

0 comments on commit c67f97a

Please sign in to comment.
Something went wrong with that request. Please try again.