[vdr] [PATCH] Fix crash when deleting a recording while cutting it.

Ville Skyttä ville.skytta at iki.fi
Sun Nov 20 23:13:09 CET 2011


---
 cutter.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cutter.c b/cutter.c
index 778302b..95b661d 100644
--- a/cutter.c
+++ b/cutter.c
@@ -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) {
-- 
1.7.6.4




More information about the vdr mailing list