summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-08-08 14:31:33 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-08-08 14:31:33 +0200
commit15030f6acece1060f9736f875fe3abbcf9392263 (patch)
treec7809ce6dceea991901aad6bd77b7ceb6a5a3e0a /menu.c
parentc896678b0c32782b48540fcf4c48e063545c4365 (diff)
downloadvdr-15030f6acece1060f9736f875fe3abbcf9392263.tar.gz
vdr-15030f6acece1060f9736f875fe3abbcf9392263.tar.bz2
Fixed a crash in case the last line in channels.conf is a group separator
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/menu.c b/menu.c
index d297d04e..512cd3a9 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.310 2004/08/08 14:19:37 kls Exp $
+ * $Id: menu.c 1.311 2004/08/08 14:29:14 kls Exp $
*/
#include "menu.h"
@@ -2628,8 +2628,11 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
//TODO
//XXX case kGreen: return osEventNow;
//XXX case kYellow: return osEventNext;
- case kOk: if (group >= 0)
- Channels.SwitchTo(Channels.Get(Channels.GetNextNormal(group))->Number());
+ case kOk: if (group >= 0) {
+ cChannel *channel = Channels.Get(Channels.GetNextNormal(group));
+ if (channel)
+ Channels.SwitchTo(channel->Number());
+ }
return osEnd;
default: if ((Key & (k_Repeat | k_Release)) == 0) {
cRemote::Put(Key);