From f3f3b2dfc050a825bef3a47a9b4fd7847bda7c1f Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Mon, 7 Nov 2022 17:13:27 +0100 Subject: check for config composite disposal in update check callback cf. #132 --- .../at/asit/pdfover/gui/composites/configuration/AboutComposite.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java index 09c2fdbc..14f7a015 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java @@ -57,7 +57,7 @@ public class AboutComposite extends ConfigurationCompositeBase { this.lnkUpdateCheckStatus = new Link(this, SWT.NONE); SWTUtils.anchor(lnkUpdateCheckStatus).bottom(100, -5).left(0,5); SWTUtils.setFontHeight(lnkUpdateCheckStatus, Constants.TEXT_SIZE_BUTTON); - UpdateCheckManager.registerStatusCallback((s) -> { latestUpdateStatus = s; getDisplay().asyncExec(() -> { RefreshUpdateStatusText(); }); }); + UpdateCheckManager.registerStatusCallback((s) -> { if (isDisposed()) return; latestUpdateStatus = s; getDisplay().asyncExec(() -> { RefreshUpdateStatusText(); }); }); SWTUtils.addSelectionListener(lnkUpdateCheckStatus, (e) -> { if (latestUpdateStatus == UpdateCheckManager.Status.OUTDATED) Program.launch(Constants.UPDATE_URL); -- cgit v1.2.3