From d9ae896ade66d7daaef16b8da0b87173c873d6cf Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Fri, 4 May 2018 14:13:56 +0200 Subject: bug fix when window is already disposed --- pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java | 4 ++++ pdf-over-gui/src/main/resources/scripts/pdf-over_win-cli.bat | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'pdf-over-gui/src') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java index d3484889..3c8caf41 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java @@ -142,6 +142,10 @@ public class MainWindow { */ public void doLayout() { Control ctrl = this.stack.topControl; + if (this.container.isDisposed()) { + //Note: if the conainter is disposed, we are finished here + return; + } this.container.layout(true, true); getShell().layout(true, true); // Note: SWT only layouts children! No grandchildren! diff --git a/pdf-over-gui/src/main/resources/scripts/pdf-over_win-cli.bat b/pdf-over-gui/src/main/resources/scripts/pdf-over_win-cli.bat index c81c5d14..d612d64d 100644 --- a/pdf-over-gui/src/main/resources/scripts/pdf-over_win-cli.bat +++ b/pdf-over-gui/src/main/resources/scripts/pdf-over_win-cli.bat @@ -1,4 +1,4 @@ @echo off -REM start /b javaw -jar "%~dp0\..\lib\pdf-over-install-helper-1.0.0.jar" +start /b javaw -jar "%~dp0\..\lib\pdf-over-install-helper-1.0.0.jar" start /b /WAIT java -cp "%~dp0\..\lib\*" at.asit.pdfover.gui.Main %* -- cgit v1.2.3