LinuxTV Patchwork Fix crash when deleting a recording while cutting it.

login
register
mail settings
Submitter Ville Skyttä
Date Nov. 20, 2011, 10:13 p.m.
Message ID <1321827189-1102-1-git-send-email-ville.skytta@iki.fi>
Download mbox | patch
Permalink /patch/12907/
State New
Headers show

Comments

Ville Skyttä - Nov. 20, 2011, 10:13 p.m.
---
 cutter.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

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) {

Privacy Policy