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

Fixed a crash with instant recordings

This commit is contained in:
Klaus Schmidinger 2012-06-13 13:03:26 +02:00
parent 2a18fb9687
commit 0192c6023f

4
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 2.56 2012/06/13 11:24:40 kls Exp $ * $Id: menu.c 2.57 2012/06/13 13:03:26 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -4180,7 +4180,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause)
if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo() if (!Timer && !cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo()
cReplayControl::SetRecording(fileName); cReplayControl::SetRecording(fileName);
Recordings.AddByName(fileName); Recordings.AddByName(fileName);
if (!Timer->IsSingleEvent()) { if (Timer && !Timer->IsSingleEvent()) {
char *Directory = strdup(fileName); char *Directory = strdup(fileName);
// going up two directory levels to get the series folder // going up two directory levels to get the series folder
if (char *p = strrchr(Directory, '/')) { if (char *p = strrchr(Directory, '/')) {