From 72fc31b915c86c54f66b3711677a85f37b846019 Mon Sep 17 00:00:00 2001 From: RKrom Date: Wed, 28 Mar 2012 19:09:15 +0000 Subject: [PATCH] Fixed exception when drawing the confluence destination toolstrip button, as the steam behind the image was disposed. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1725 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- GreenshotConfluencePlugin/ConfluenceDestination.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GreenshotConfluencePlugin/ConfluenceDestination.cs b/GreenshotConfluencePlugin/ConfluenceDestination.cs index 137fca59d..71ea6af34 100644 --- a/GreenshotConfluencePlugin/ConfluenceDestination.cs +++ b/GreenshotConfluencePlugin/ConfluenceDestination.cs @@ -45,7 +45,9 @@ namespace GreenshotConfluencePlugin { static ConfluenceDestination() { Uri confluenceIconUri = new Uri("/GreenshotConfluencePlugin;component/Images/Confluence.ico", UriKind.Relative); using (Stream iconStream = Application.GetResourceStream(confluenceIconUri).Stream) { - confluenceIcon = Image.FromStream(iconStream); + using (Image tmpImage = Image.FromStream(iconStream)) { + confluenceIcon = ImageHelper.Clone(tmpImage); + } } }