summaryrefslogtreecommitdiff
path: root/cutter.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-12-04 12:56:55 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2011-12-04 12:56:55 +0100
commitada6766c194c8caf3415a023b74ffe46db9be119 (patch)
treef7a418a4834f7f6b281f46113fa3786a290dab0d /cutter.c
parent9eeecef612256f1a2b8fc81c3098e78b4f475be2 (diff)
downloadvdr-ada6766c194c8caf3415a023b74ffe46db9be119.tar.gz
vdr-ada6766c194c8caf3415a023b74ffe46db9be119.tar.bz2
Fixed a crash when deleting a recording while cutting it
Diffstat (limited to 'cutter.c')
-rw-r--r--cutter.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cutter.c b/cutter.c
index 94653dd7..f4df7fe9 100644
--- a/cutter.c
+++ b/cutter.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: cutter.c 2.9 2011/10/09 16:09:58 kls Exp $
+ * $Id: cutter.c 2.10 2011/12/04 12:55:53 kls Exp $
*/
#include "cutter.h"
@@ -100,7 +100,8 @@ void cCuttingThread::Action(void)
if (fromIndex->Get(Index++, &FileNumber, &FileOffset, &Independent, &Length)) {
if (FileNumber != CurrentFileNumber) {
fromFile = fromFileName->SetOffset(FileNumber, FileOffset);
- fromFile->SetReadAhead(MEGABYTE(20));
+ if (fromFile)
+ fromFile->SetReadAhead(MEGABYTE(20));
CurrentFileNumber = FileNumber;
}
if (fromFile) {