summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-01-05 15:29:46 +0100
committerlouis <louis.braun@gmx.de>2013-01-05 15:29:46 +0100
commit97aeb93680de0ae99d8be0c3b1f51c043ecd0836 (patch)
tree0e6afd04dbfe802b3411c42e2b20c5b225b99a94
parent87fb0024bd4fcd32c413ab3c0fcb8b6323cb7c33 (diff)
downloadskin-nopacity-97aeb93680de0ae99d8be0c3b1f51c043ecd0836.tar.gz
skin-nopacity-97aeb93680de0ae99d8be0c3b1f51c043ecd0836.tar.bz2
Fixed some nullpointer accesses in Schedules Menus
-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;