diff options
author | sr55 <[email protected]> | 2010-10-31 17:39:36 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-10-31 17:39:36 +0000 |
commit | 812a95f0dcf1b396a213deaf93d50ab896d249f9 (patch) | |
tree | 276532ec297a671eda2ac4a7421a24207a6d96da /win/C#/HandBrake.ApplicationServices/Services/Scan.cs | |
parent | ca9461c624d182a68746af2bfa006f5a00124c21 (diff) |
WinGui:
- Unsubscribe an event handler when cancelling the scan.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3632 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/HandBrake.ApplicationServices/Services/Scan.cs')
-rw-r--r-- | win/C#/HandBrake.ApplicationServices/Services/Scan.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs index c18fad3d8..e2412cbd3 100644 --- a/win/C#/HandBrake.ApplicationServices/Services/Scan.cs +++ b/win/C#/HandBrake.ApplicationServices/Services/Scan.cs @@ -138,6 +138,8 @@ namespace HandBrake.ApplicationServices.Services {
try
{
+ this.readData.OnScanProgress -= this.OnScanProgress;
+
if (hbProc != null && !hbProc.HasExited)
hbProc.Kill();
}
@@ -201,7 +203,7 @@ namespace HandBrake.ApplicationServices.Services this.hbProc.Start();
this.readData = new Parser(this.hbProc.StandardError.BaseStream);
- this.readData.OnScanProgress += new ScanProgressEventHandler(this.OnScanProgress);
+ this.readData.OnScanProgress += this.OnScanProgress;
this.SouceData = DVD.Parse(this.readData);
// Write the Buffer out to file.
|