summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--menuitem.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/menuitem.c b/menuitem.c
index 9b23bc8..918889e 100644
--- a/menuitem.c
+++ b/menuitem.c
@@ -311,6 +311,8 @@ void cNopacityScheduleMenuItem::CreatePixmapTextScroller(int totalWidth) {
}
void cNopacityScheduleMenuItem::CreateText() {
+ if (!Event)
+ return;
std::stringstream sstrDateTime;
time_t now = time(NULL);
std::string dayNow = *WeekDayName(now);
@@ -406,7 +408,7 @@ void cNopacityScheduleMenuItem::Render() {
delete infoTextWindow;
infoTextWindow = NULL;
}
- if (current) {
+ if (current && Event) {
infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow);
infoTextWindow->SetGeometry(textWindow);
infoTextWindow->SetText(Event->Description());
@@ -461,6 +463,8 @@ void cNopacityScheduleMenuItem::DrawLogo(int logoWidth, int logoHeight) {
}
void cNopacityScheduleMenuItem::DrawRemaining(int x, int y, int width) {
+ if (!Event)
+ return;
time_t now = time(NULL);
if ((now < Event->StartTime()) || (now > Event->EndTime()))
return;