aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2009-10-06 09:37:10 +0200
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2009-10-06 09:37:10 +0200
commit1afe4083af2355924c810b478f0655d695e50c45 (patch)
treec737c6fd5daf554cd7de162f0f96b88052a1f919
parenteafe6abdba24ab9f4336baf0eb9940981e2969b1 (diff)
downloadenigma2-1afe4083af2355924c810b478f0655d695e50c45.tar.gz
enigma2-1afe4083af2355924c810b478f0655d695e50c45.zip
don't crash when video modes are broken
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
index bceb6bc7..3759c21a 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
@@ -105,8 +105,9 @@ class VideoWizard(WizardLanguage, Rc):
modeList = self.hw.getModeList(self.selection)
print "modeList:", modeList
self.port = port
- ratesList = self.listRates(modeList[0][0])
- self.hw.setMode(port = port, mode = modeList[0][0], rate = ratesList[0][0])
+ if (len(modeList) > 0):
+ ratesList = self.listRates(modeList[0][0])
+ self.hw.setMode(port = port, mode = modeList[0][0], rate = ratesList[0][0])
def listModes(self):
list = []