diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-08-08 14:31:33 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-08-08 14:31:33 +0200 |
commit | 15030f6acece1060f9736f875fe3abbcf9392263 (patch) | |
tree | c7809ce6dceea991901aad6bd77b7ceb6a5a3e0a /menu.c | |
parent | c896678b0c32782b48540fcf4c48e063545c4365 (diff) | |
download | vdr-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.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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); |