From 12308b3c29c89c077b456558507af7d77495344d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Thu, 8 Dec 2016 10:43:58 +0100 Subject: Fixed a crash when trying to delete a channel that is being used by a timer --- HISTORY | 1 + menu.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 4ae2b0e1..a06e8910 100644 --- a/HISTORY +++ b/HISTORY @@ -8843,3 +8843,4 @@ Video Disk Recorder Revision History same thread. This fixes possible crashes when moving or deleting channels in the menu or through SVDRP (as well as other operations that try to acquire a read lock within a write lock). +- Fixed a crash when trying to delete a channel that is being used by a timer. diff --git a/menu.c b/menu.c index eebad8b2..5ec32ce6 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 4.13 2015/09/16 11:02:33 kls Exp $ + * $Id: menu.c 4.14 2016/12/08 10:39:29 kls Exp $ */ #include "menu.h" @@ -498,6 +498,7 @@ eOSState cMenuChannels::Delete(void) int DeletedChannel = Channel->Number(); // Check if there is a timer using this channel: if (Timers->UsesChannel(Channel)) { + channelsStateKey.Remove(false); Skins.Message(mtError, tr("Channel is being used by a timer!")); return osContinue; } -- cgit v1.2.3