1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed a crash in case the last line in channels.conf is a group separator

This commit is contained in:
Klaus Schmidinger 2004-08-08 14:31:33 +02:00
parent c896678b0c
commit 15030f6ace
3 changed files with 12 additions and 3 deletions

View File

@ -1064,3 +1064,7 @@ J
Mike parker <vdr@msatt.freeserve.co.uk> Mike parker <vdr@msatt.freeserve.co.uk>
for helping to test support for NVOD channels for helping to test support for NVOD channels
Dick Streefland <Dick.Streefland@xs4all.nl>
for fixing a crash in case the last line in channels.conf is a group separator and
that group is selected in the channel display

View File

@ -2974,3 +2974,5 @@ Video Disk Recorder Revision History
(thanks to Andreas Share for pointing this out). (thanks to Andreas Share for pointing this out).
- Fixed a possible NULL pointer assignment in cMenuText::SetText() (thanks to - Fixed a possible NULL pointer assignment in cMenuText::SetText() (thanks to
Marco Schlüssler). Marco Schlüssler).
- Fixed a crash in case the last line in channels.conf is a group separator and
that group is selected in the channel display (thanks to Dick Streefland).

9
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "menu.h"
@ -2628,8 +2628,11 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
//TODO //TODO
//XXX case kGreen: return osEventNow; //XXX case kGreen: return osEventNow;
//XXX case kYellow: return osEventNext; //XXX case kYellow: return osEventNext;
case kOk: if (group >= 0) case kOk: if (group >= 0) {
Channels.SwitchTo(Channels.Get(Channels.GetNextNormal(group))->Number()); cChannel *channel = Channels.Get(Channels.GetNextNormal(group));
if (channel)
Channels.SwitchTo(channel->Number());
}
return osEnd; return osEnd;
default: if ((Key & (k_Repeat | k_Release)) == 0) { default: if ((Key & (k_Repeat | k_Release)) == 0) {
cRemote::Put(Key); cRemote::Put(Key);