Commit fabcef50 authored by John Stowers's avatar John Stowers

Fix crash on empty combo lists (bug 649003)

parent f5a3e728
......@@ -137,8 +137,11 @@ class GSettingsComboTweak(_GSettingsTweak):
def __init__(self, schema_name, key_name, key_options, **options):
_GSettingsTweak.__init__(self, schema_name, key_name, **options)
assert len(key_options) > 0
assert len(key_options[0]) == 2
#check key_options is iterable
#and if supplied, check it is a list of 2-tuples
assert len(key_options) >= 0
if len(key_options):
assert len(key_options[0]) == 2
combo = build_combo_box_text(
self.settings.get_value(self.key_name),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment