fix bsod when draw epglist entrys without beginTime
[vuplus_dvbapp] / lib / python / Plugins / Extensions / GraphMultiEPG / GraphMultiEpg.py
index 4929703..ae58608 100644 (file)
@@ -17,7 +17,8 @@ from Screens.EpgSelection import EPGSelection
 from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
 from RecordTimer import RecordTimerEntry, parseEvent
 from ServiceReference import ServiceReference
-from enigma import eEPGCache, eListbox, gFont, loadPNG, eListboxPythonMultiContent, \
+from Tools.LoadPixmap import LoadPixmap
+from enigma import eEPGCache, eListbox, gFont, eListboxPythonMultiContent, \
        RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_VALIGN_CENTER, RT_WRAP, eRect, eTimer
 
 from time import localtime, time, strftime
@@ -38,7 +39,7 @@ class EPGList(HTMLComponent, GUIComponent):
                if overjump_empty:
                        self.l.setSelectableFunc(self.isSelectable)
                self.epgcache = eEPGCache.getInstance()
-               self.clock_pixmap = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, 'epgclock-fs8.png'))
+               self.clock_pixmap = LoadPixmap(resolveFilename(SCOPE_SKIN_IMAGE, 'epgclock-fs8.png'))
                self.time_base = None
                self.time_epoch = time_epoch
                self.list = None
@@ -214,11 +215,11 @@ class EPGList(HTMLComponent, GUIComponent):
                        borderColor = self.borderColor
 
                        for ev in events:  #(event_id, event_title, begin_time, duration)
-                               rec=self.timer.isInTimer(ev[0], ev[2], ev[3], service) > ((ev[3]/10)*8)
+                               rec=ev[2] and self.timer.isInTimer(ev[0], ev[2], ev[3], service) > ((ev[3]/10)*8)
                                xpos, ewidth = self.calcEntryPosAndWidthHelper(ev[2], ev[3], start, end, width)
                                res.append(MultiContentEntryText(pos = (left+xpos, top), size = (ewidth, height), font = 1, flags = RT_HALIGN_CENTER | RT_VALIGN_CENTER | RT_WRAP, text = ev[1], color = foreColor, color_sel = foreColorSelected, backcolor = backColor, backcolor_sel = backColorSelected, border_width = 1, border_color = borderColor))
                                if rec and ewidth > 23:
-                                       res.append(MultiContentEntryPixmapAlphaTest(pos = (left+xpos+ewidth-22, top+height-22), size = (21, 21), png = self.clock_pixmap, backcolor = backColor, backcolor_selected = backColorSelected))
+                                       res.append(MultiContentEntryPixmapAlphaTest(pos = (left+xpos+ewidth-22, top+height-22), size = (21, 21), png = self.clock_pixmap, backcolor = backColor, backcolor_sel = backColorSelected))
                return res
 
        def selEntry(self, dir, visible=True):