From 053b66b521438dee9485a0ef16e2e7292af49b51 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 10 Jan 2008 00:34:15 +0000 Subject: [PATCH] fix bsod when draw epglist entrys without beginTime --- lib/python/Components/EpgList.py | 4 ++-- lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/python/Components/EpgList.py b/lib/python/Components/EpgList.py index ba8d029..2f72984 100644 --- a/lib/python/Components/EpgList.py +++ b/lib/python/Components/EpgList.py @@ -132,7 +132,7 @@ class EPGList(HTMLComponent, GUIComponent): self.service_rect = Rect(width/20*7, 0, width/20*13, height) def buildSingleEntry(self, service, eventId, beginTime, duration, EventName): - rec=(self.timer.isInTimer(eventId, beginTime, duration, service) > ((duration/10)*8)) + rec=beginTime and (self.timer.isInTimer(eventId, beginTime, duration, service) > ((duration/10)*8)) r1=self.weekday_rect r2=self.datetime_rect r3=self.descr_rect @@ -148,7 +148,7 @@ class EPGList(HTMLComponent, GUIComponent): return res def buildSimilarEntry(self, service, eventId, beginTime, service_name, duration): - rec=(self.timer.isInTimer(eventId, beginTime, duration, service) > ((duration/10)*8)) + rec=beginTime and (self.timer.isInTimer(eventId, beginTime, duration, service) > ((duration/10)*8)) r1=self.weekday_rect r2=self.datetime_rect r3=self.service_rect diff --git a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py index d6d2759..ae58608 100644 --- a/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py +++ b/lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py @@ -215,7 +215,7 @@ 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: -- 2.7.4