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
This commit is contained in:
RKrom 2012-03-28 19:09:15 +00:00
commit 72fc31b915

View file

@ -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);
}
}
}