aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2018-10-28 09:15:11 +0100
committerGitHub <noreply@github.com>2018-10-28 09:15:11 +0100
commit5df815a45602553dd61b1417d2ecb865dd9a7b87 (patch)
treed3b99e3b729332b51c4b4c688c12141c34735fbc
parent1311fad5afb3a7ff23b25ba264abf6aa7d3f6c9c (diff)
parentbcc5650cd1b3b84d88a60057e27b14cb75a2d594 (diff)
Merge pull request #14621 from notspiff/allow_number
Allow number
-rw-r--r--xbmc/addons/binary-addons/AddonDll.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/xbmc/addons/binary-addons/AddonDll.cpp b/xbmc/addons/binary-addons/AddonDll.cpp
index d1442c57ce..aa9dc733b7 100644
--- a/xbmc/addons/binary-addons/AddonDll.cpp
+++ b/xbmc/addons/binary-addons/AddonDll.cpp
@@ -693,13 +693,16 @@ bool CAddonDll::get_setting_int(void* kodiBase, const char* id, int* value)
return false;
}
- if (setting->GetType() != SettingType::Integer)
+ if (setting->GetType() != SettingType::Integer && setting->GetType() != SettingType::Number)
{
CLog::Log(LOGERROR, "kodi::General::%s - setting '%s' is not a integer in '%s'", __FUNCTION__, id, addon->Name().c_str());
return false;
}
- *value = std::static_pointer_cast<CSettingInt>(setting)->GetValue();
+ if (setting->GetType() == SettingType::Integer)
+ *value = std::static_pointer_cast<CSettingInt>(setting)->GetValue();
+ else
+ *value = static_cast<int>(std::static_pointer_cast<CSettingNumber>(setting)->GetValue());
return true;
}