Avoiding a compiler warning

This commit is contained in:
Klaus Schmidinger 2022-11-22 15:53:07 +01:00
parent f859b8d2ae
commit d06c5efa54
1 changed files with 2 additions and 2 deletions

4
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 5.7 2022/03/03 14:44:47 kls Exp $
* $Id: menu.c 5.8 2022/11/22 15:53:07 kls Exp $
*/
#include "menu.h"
@ -2097,7 +2097,7 @@ eOSState cMenuSchedule::Switch(void)
if (item) {
LOCK_CHANNELS_READ;
const cChannel *Channel = NULL;
if (Channel = Channels->GetByChannelID(item->event->ChannelID(), true)) {
if ((Channel = Channels->GetByChannelID(item->event->ChannelID(), true)) != NULL) {
if (!Channels->SwitchTo(Channel->Number()))
Channel = NULL;
}