diff options
author | louis <louis.braun@gmx.de> | 2013-01-05 15:29:46 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-01-05 15:29:46 +0100 |
commit | 97aeb93680de0ae99d8be0c3b1f51c043ecd0836 (patch) | |
tree | 0e6afd04dbfe802b3411c42e2b20c5b225b99a94 | |
parent | 87fb0024bd4fcd32c413ab3c0fcb8b6323cb7c33 (diff) | |
download | skin-nopacity-97aeb93680de0ae99d8be0c3b1f51c043ecd0836.tar.gz skin-nopacity-97aeb93680de0ae99d8be0c3b1f51c043ecd0836.tar.bz2 |
Fixed some nullpointer accesses in Schedules Menus
-rw-r--r-- | menuitem.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |