Skip to content
This repository
Browse code

addons: fix crash by not showing "Configure" option for skins

  • Loading branch information...
commit e92b24b97e2c582471ffab91818e3f2299a91bbe 1 parent 15a9154
Sascha Montellese authored July 28, 2013
2  xbmc/addons/Addon.h
@@ -107,7 +107,7 @@ class CAddon : public IAddon
107 107
    \return true if the addon has settings, false otherwise
108 108
    \sa LoadSettings, LoadUserSettings, SaveSettings, HasUserSettings, GetSetting, UpdateSetting
109 109
    */
110  
-  virtual bool HasSettings();
  110
+  bool HasSettings();
111 111
 
112 112
   /*! \brief Check whether the user has configured this addon or not
113 113
    \return true if previously saved settings are found, false otherwise
5  xbmc/addons/Skin.cpp
@@ -102,11 +102,6 @@ CSkinInfo::~CSkinInfo()
102 102
 {
103 103
 }
104 104
 
105  
-bool CSkinInfo::HasSettings()
106  
-{
107  
-  return HasSkinFile("SkinSettings.xml");
108  
-}
109  
-
110 105
 struct closestRes
111 106
 {
112 107
   closestRes(const RESOLUTION_INFO &target) : m_target(target) { };
2  xbmc/addons/Skin.h
@@ -52,8 +52,6 @@ class CSkinInfo : public CAddon
52 52
   CSkinInfo(const cp_extension_t *ext);
53 53
   virtual ~CSkinInfo();
54 54
 
55  
-  virtual bool HasSettings();
56  
-
57 55
   /*! \brief Load resultion information from directories in Path().
58 56
    */
59 57
   void Start();
3  xbmc/settings/Settings.cpp
@@ -100,6 +100,9 @@ bool AddonHasSettings(const std::string &condition, const std::string &value, co
100 100
   if (!ADDON::CAddonMgr::Get().GetAddon(setting->GetValue(), addon, setting->GetAddonType()) || addon == NULL)
101 101
     return false;
102 102
 
  103
+  if (addon->Type() == ADDON::ADDON_SKIN)
  104
+    return ((ADDON::CSkinInfo*)addon.get())->HasSkinFile("SkinSettings.xml");
  105
+
103 106
   return addon->HasSettings();
104 107
 }
105 108
 

0 notes on commit e92b24b

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