[longomatch] Catch any Exception closing the capturer
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [longomatch] Catch any Exception closing the capturer
- Date: Sun,  3 Oct 2010 19:20:08 +0000 (UTC)
commit c32033f12092092462dc365730553588b2ce426c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Oct 3 21:18:24 2010 +0200
    Catch any Exception closing the capturer
    
    On win32 some users have reported that the capturer throws a
    division-by-zero exception that I can't reproduce. Catch it to continue
    the process of saving the project
 CesarPlayer/Gui/CapturerBin.cs |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/CesarPlayer/Gui/CapturerBin.cs b/CesarPlayer/Gui/CapturerBin.cs
index 108e257..30d5466 100644
--- a/CesarPlayer/Gui/CapturerBin.cs
+++ b/CesarPlayer/Gui/CapturerBin.cs
@@ -167,15 +167,17 @@ namespace LongoMatch.Gui
 			return;
 			
 			/* stopping and closing capturer */
-			capturer.Stop();
-			capturer.Close();
-			if (capturerType == CapturerType.Live){
-				/* release and dispose live capturer */
-				capturer.Error -= OnError;
-				capturer.DeviceChange += OnDeviceChange;
-				capturerhbox.Remove(capturer as Gtk.Widget);
-				capturer.Dispose();
-			}
+			try {
+				capturer.Stop();
+				capturer.Close();
+				if (capturerType == CapturerType.Live){
+					/* release and dispose live capturer */
+					capturer.Error -= OnError;
+					capturer.DeviceChange += OnDeviceChange;
+					capturerhbox.Remove(capturer as Gtk.Widget);
+					capturer.Dispose();
+				}
+			} catch (Exception e) {}
 			capturer = null;
 		}
 		
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]