diff options
author | montellese <montellese@xbmc.org> | 2013-07-28 23:17:14 +0200 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2013-07-28 23:17:14 +0200 |
commit | e92b24b97e2c582471ffab91818e3f2299a91bbe (patch) | |
tree | 7287932162916a68ed21df123ae018fabd1cdad7 | |
parent | 15a915474a22d12ce424324049c30870ce860f1c (diff) |
addons: fix crash by not showing "Configure" option for skins
-rw-r--r-- | xbmc/addons/Addon.h | 2 | ||||
-rw-r--r-- | xbmc/addons/Skin.cpp | 5 | ||||
-rw-r--r-- | xbmc/addons/Skin.h | 2 | ||||
-rw-r--r-- | xbmc/settings/Settings.cpp | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/xbmc/addons/Addon.h b/xbmc/addons/Addon.h index 6629f99fec..c30f5b9fa4 100644 --- a/xbmc/addons/Addon.h +++ b/xbmc/addons/Addon.h @@ -107,7 +107,7 @@ public: \return true if the addon has settings, false otherwise \sa LoadSettings, LoadUserSettings, SaveSettings, HasUserSettings, GetSetting, UpdateSetting */ - virtual bool HasSettings(); + bool HasSettings(); /*! \brief Check whether the user has configured this addon or not \return true if previously saved settings are found, false otherwise diff --git a/xbmc/addons/Skin.cpp b/xbmc/addons/Skin.cpp index 84ffdf59df..7903790538 100644 --- a/xbmc/addons/Skin.cpp +++ b/xbmc/addons/Skin.cpp @@ -102,11 +102,6 @@ CSkinInfo::~CSkinInfo() { } -bool CSkinInfo::HasSettings() -{ - return HasSkinFile("SkinSettings.xml"); -} - struct closestRes { closestRes(const RESOLUTION_INFO &target) : m_target(target) { }; diff --git a/xbmc/addons/Skin.h b/xbmc/addons/Skin.h index 2b3a2cc33e..d1c1dae210 100644 --- a/xbmc/addons/Skin.h +++ b/xbmc/addons/Skin.h @@ -52,8 +52,6 @@ public: CSkinInfo(const cp_extension_t *ext); virtual ~CSkinInfo(); - virtual bool HasSettings(); - /*! \brief Load resultion information from directories in Path(). */ void Start(); diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp index b5fd369e48..5130910e6c 100644 --- a/xbmc/settings/Settings.cpp +++ b/xbmc/settings/Settings.cpp @@ -100,6 +100,9 @@ bool AddonHasSettings(const std::string &condition, const std::string &value, co if (!ADDON::CAddonMgr::Get().GetAddon(setting->GetValue(), addon, setting->GetAddonType()) || addon == NULL) return false; + if (addon->Type() == ADDON::ADDON_SKIN) + return ((ADDON::CSkinInfo*)addon.get())->HasSkinFile("SkinSettings.xml"); + return addon->HasSettings(); } |