Skip to content
This repository
Browse code

Merge pull request #2255 from ulion/fix_plugin_setting_not_show_problem

Fix sometimes select plugin setting from context menu not works problem.
  • Loading branch information...
commit dfcc04de77509e6e6ebfab1fa92df32f24938274 2 parents 2856263 + 4f39434
jmarshallnz authored February 20, 2013

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  xbmc/windows/GUIMediaWindow.cpp
6  xbmc/windows/GUIMediaWindow.cpp
@@ -1603,7 +1603,11 @@ bool CGUIMediaWindow::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
1603 1603
     }
1604 1604
   case CONTEXT_BUTTON_PLUGIN_SETTINGS:
1605 1605
     {
1606  
-      CURL plugin(m_vecItems->Get(itemNumber)->GetPath());
  1606
+      CFileItemPtr item = m_vecItems->Get(itemNumber);
  1607
+      // CONTEXT_BUTTON_PLUGIN_SETTINGS can be called for plugin item
  1608
+      // or script item; or for the plugin directory current listing.
  1609
+      bool isPluginOrScriptItem = (item && (item->IsPlugin() || item->IsScript()));
  1610
+      CURL plugin(isPluginOrScriptItem ? item->GetPath() : m_vecItems->GetPath());
1607 1611
       ADDON::AddonPtr addon;
1608 1612
       if (CAddonMgr::Get().GetAddon(plugin.GetHostName(), addon))
1609 1613
         if (CGUIDialogAddonSettings::ShowAndGetInput(addon))

0 notes on commit dfcc04d

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