diff --git a/vassal-app/src/main/java/VASSAL/tools/swing/DialogCloser.java b/vassal-app/src/main/java/VASSAL/tools/swing/DialogCloser.java index b7c4aa4622..8444a01fd8 100644 --- a/vassal-app/src/main/java/VASSAL/tools/swing/DialogCloser.java +++ b/vassal-app/src/main/java/VASSAL/tools/swing/DialogCloser.java @@ -34,11 +34,12 @@ public DialogCloser(JDialog dialog, int ms) { @Override public void run() { - try { - Thread.sleep(ms); - } - catch (InterruptedException e) { - throw new RuntimeException(e); + if (ms > 1) { // Zero means no sleep - refresh only + try { + Thread.sleep(ms); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } } dialog.setVisible(false); dialog.dispose();