summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-11-01 15:50:00 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2000-11-01 15:50:00 +0100
commit24c17aa02f2c12faf3d71093a3aac3b45043bf0c (patch)
treec0df64b91f07580208fe94c986d745434b05696a /menu.c
parentfb096c680f671d8b0a4b5a1e1dddf9aa96020061 (diff)
downloadvdr-24c17aa02f2c12faf3d71093a3aac3b45043bf0c.tar.gz
vdr-24c17aa02f2c12faf3d71093a3aac3b45043bf0c.tar.bz2
Fixed handling empty 'Schedule' menu
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/menu.c b/menu.c
index b102861f..a3701e38 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.39 2000/11/01 15:35:43 kls Exp $
+ * $Id: menu.c 1.40 2000/11/01 15:50:00 kls Exp $
*/
#include "menu.h"
@@ -1201,7 +1201,9 @@ eOSState cMenuWhatsOn::ProcessKey(eKeys Key)
case kRed: return Record();
case kYellow: return osBack;
case kBlue: return Switch();
- case kOk: return AddSubMenu(new cMenuEvent(((cMenuWhatsOnItem *)Get(Current()))->eventInfo, true));
+ case kOk: if (Count())
+ return AddSubMenu(new cMenuEvent(((cMenuWhatsOnItem *)Get(Current()))->eventInfo, true));
+ break;
default: break;
}
}
@@ -1311,7 +1313,9 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key)
next = !next;
return AddSubMenu(new cMenuWhatsOn(schedules, now));
case kYellow: return AddSubMenu(new cMenuWhatsOn(schedules, false));
- case kOk: return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->eventInfo));
+ case kOk: if (Count())
+ return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->eventInfo));
+ break;
default: break;
}
}