diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-01-18 00:14:16 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-01-18 00:14:16 +0000 |
| commit | 9a8c3eab7a0823b5dfc6111f07a04cf05d00b57b (patch) | |
| tree | f37239ae32d7125bbc429af242cdc2074c23a22f /lib/python/Screens | |
| parent | e628d5490dab543bfa2f109d28f504c49f89a2d7 (diff) | |
| download | enigma2-9a8c3eab7a0823b5dfc6111f07a04cf05d00b57b.tar.gz enigma2-9a8c3eab7a0823b5dfc6111f07a04cf05d00b57b.zip | |
no more crash when press ok in a empty choicebox
Diffstat (limited to 'lib/python/Screens')
| -rw-r--r-- | lib/python/Screens/ChoiceBox.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/Screens/ChoiceBox.py b/lib/python/Screens/ChoiceBox.py index 37729887..b1d74ad5 100644 --- a/lib/python/Screens/ChoiceBox.py +++ b/lib/python/Screens/ChoiceBox.py @@ -74,7 +74,11 @@ class ChoiceBox(Screen): # runs the current selected entry def go(self): - self.goEntry(self["list"].l.getCurrentSelection()[0]) + cursel = self["list"].l.getCurrentSelection() + if cursel: + self.goEntry(cursel[0]) + else: + self.cancel() # runs a specific entry def goEntry(self, entry): |
