Fixed memory leak when closing the destination picker by using the keyboard (e.g. ESC or Alt+F4). This might solve bug #3556050, if nothing else is reported.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1983 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-08-10 14:32:11 +00:00
commit b589d756d6

View file

@ -66,7 +66,10 @@ namespace Greenshot.Destinations {
switch (eventArgs.CloseReason) { switch (eventArgs.CloseReason) {
case ToolStripDropDownCloseReason.ItemClicked: case ToolStripDropDownCloseReason.ItemClicked:
case ToolStripDropDownCloseReason.CloseCalled: case ToolStripDropDownCloseReason.CloseCalled:
break;
case ToolStripDropDownCloseReason.Keyboard: case ToolStripDropDownCloseReason.Keyboard:
// Dispose as the close is clicked
surface.Dispose();
break; break;
default: default:
eventArgs.Cancel = true; eventArgs.Cancel = true;