aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}