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
This commit is contained in:
RKrom 2012-06-25 09:55:23 +00:00
commit b527eefb77

View file

@ -124,7 +124,12 @@ namespace GreenshotPlugin.Core {
basisMenuItem.DropDownOpening += delegate (object source, EventArgs eventArgs) {
if (basisMenuItem.DropDownItems.Count == 0) {
List<IDestination> subDestinations = new List<IDestination>();
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);