aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Marshall <jmarshall@xbmc.org>2013-11-12 13:22:49 +1300
committerJonathan Marshall <jmarshall@xbmc.org>2013-11-12 13:22:49 +1300
commitb37e6eabf6f2b9a2ac576ba1db3224813946a846 (patch)
tree1812cfb3f46c0291a74d45d7e267da657309bb8e
parent1a3884632e5de440a7b2a87c72e979c3c712fc3b (diff)
don't crash if a setting doesn't have a <control> defined
-rw-r--r--xbmc/settings/windows/GUIWindowSettingsCategory.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/xbmc/settings/windows/GUIWindowSettingsCategory.cpp b/xbmc/settings/windows/GUIWindowSettingsCategory.cpp
index bf66ced314..11237b2bf5 100644
--- a/xbmc/settings/windows/GUIWindowSettingsCategory.cpp
+++ b/xbmc/settings/windows/GUIWindowSettingsCategory.cpp
@@ -679,6 +679,9 @@ CGUIControl* CGUIWindowSettingsCategory::AddSetting(CSetting *pSetting, float wi
}
// create the proper controls
+ if (!pSetting->GetControl())
+ return NULL;
+
std::string controlType = pSetting->GetControl()->GetType();
if (controlType == "toggle")
{