check for validity of parameter
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 1 Jan 2006 20:49:13 +0000 (20:49 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 1 Jan 2006 20:49:13 +0000 (20:49 +0000)
lib/python/Components/config.py

index 40a460c..6897aa8 100644 (file)
@@ -466,6 +466,8 @@ class configElement:
                if control == ConfigSlider:
                        return str(data)
                elif control == configSelection:
                if control == ConfigSlider:
                        return str(data)
                elif control == configSelection:
+                       if len(self.vals) < data + 1:
+                               return "0"
                        if isinstance(self.vals[data], str):
                                return str(data)
                        else:
                        if isinstance(self.vals[data], str):
                                return str(data)
                        else: