From b527eefb770f2b537402ce1360f55023fb73d99f Mon Sep 17 00:00:00 2001 From: RKrom Date: Mon, 25 Jun 2012 09:55:23 +0000 Subject: [PATCH] Fixing Bug #3536968 by catching the COMException (every exception) and not displaying the "subDestinations". This won't solve all COM exceptions... git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1932 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- GreenshotPlugin/Core/AbstractDestination.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/GreenshotPlugin/Core/AbstractDestination.cs b/GreenshotPlugin/Core/AbstractDestination.cs index 2d848b47c..62d85fb43 100644 --- a/GreenshotPlugin/Core/AbstractDestination.cs +++ b/GreenshotPlugin/Core/AbstractDestination.cs @@ -124,7 +124,12 @@ namespace GreenshotPlugin.Core { basisMenuItem.DropDownOpening += delegate (object source, EventArgs eventArgs) { if (basisMenuItem.DropDownItems.Count == 0) { List subDestinations = new List(); - subDestinations.AddRange(DynamicDestinations()); + // Fixing Bug #3536968 by catching the COMException (every exception) and not displaying the "subDestinations" + try { + subDestinations.AddRange(DynamicDestinations()); + } catch(Exception ex) { + LOG.ErrorFormat("Skipping {0}, due to the following error: {1}", Description, ex.Message); + } if (subDestinations.Count > 0) { subDestinations.Sort(); ToolStripMenuItem destinationMenuItem = new ToolStripMenuItem(Description);