summaryrefslogtreecommitdiff
path: root/community/libpar2/libpar2-0.2-bugfixes.patch
blob: cb3c938dfe74b60bbe405718cec3f24a62f1b9bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff -aud ../libpar2-0.2-original/par2repairer.cpp ../libpar2-0.2/par2repairer.cpp
--- ../libpar2-0.2-original/par2repairer.cpp	2006-01-20 18:25:20.000000000 +0100
+++ ../libpar2-0.2/par2repairer.cpp	2008-02-06 12:02:53.226050300 +0100
@@ -78,6 +78,7 @@
 
   delete mainpacket;
   delete creatorpacket;
+  delete headers;
 }
 
 
@@ -1261,7 +1262,7 @@
         DiskFile::SplitFilename(filename, path, name);
 
         cout << "Target: \"" << name << "\" - missing." << endl;
-	sig_done.emit(name, 0, sourcefile->GetVerificationPacket()->BlockCount());
+	sig_done.emit(name, 0, sourcefile->GetVerificationPacket() ? sourcefile->GetVerificationPacket()->BlockCount() : 0);
       }
     }
 
@@ -1804,7 +1805,7 @@
       }
     }
   }
-  sig_done.emit(name,count,sourcefile->GetVerificationPacket()->BlockCount()); 
+  sig_done.emit(name,count, sourcefile->GetVerificationPacket() ? sourcefile->GetVerificationPacket()->BlockCount() : 0); 
   sig_progress.emit(1000.0);
   return true;
 }