ignore ok button when menu is empty
authorFelix Domke <tmbinc@elitedvb.net>
Sat, 24 Nov 2007 14:09:09 +0000 (14:09 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Sat, 24 Nov 2007 14:09:09 +0000 (14:09 +0000)
lib/python/Screens/Menu.py

index 7ae50cd..19b3604 100644 (file)
@@ -74,7 +74,8 @@ class Menu(Screen):
        def okbuttonClick(self):
                print "okbuttonClick"
                selection = self["menu"].getCurrent()
        def okbuttonClick(self):
                print "okbuttonClick"
                selection = self["menu"].getCurrent()
-               selection[1]()
+               if selection is not None:
+                       selection[1]()
 
        def execText(self, text):
                exec text
 
        def execText(self, text):
                exec text