From b2b84b72851909f697b213d248490cfbcda7fa04 Mon Sep 17 00:00:00 2001 From: mguessan Date: Mon, 1 Feb 2010 22:53:15 +0000 Subject: [PATCH] Catch error on SWT exit git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@935 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/ui/tray/SwtGatewayTray.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/java/davmail/ui/tray/SwtGatewayTray.java b/src/java/davmail/ui/tray/SwtGatewayTray.java index 787ee6c3..1e4a8909 100644 --- a/src/java/davmail/ui/tray/SwtGatewayTray.java +++ b/src/java/davmail/ui/tray/SwtGatewayTray.java @@ -322,7 +322,13 @@ public class SwtGatewayTray implements DavGatewayTrayInterface { if (image2 != null) { image2.dispose(); } - display.dispose(); + try { + if (!display.isDisposed()) { + display.dispose(); + } + } catch (Exception e) { + // already disposed + } // dispose AWT frames settingsFrame.dispose(); aboutFrame.dispose();