From: Daniel Kirschten Date: Wed, 25 Sep 2019 10:06:27 +0000 (+0200) Subject: Fixed an exception being thrown when the application exits X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=8f54507e17429185b36515338b9ebc5c42e50d70;hp=2751f62b61e692c1dbc90b708114c5b50a73d7c0;p=Mograsim.git Fixed an exception being thrown when the application exits --- diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java index f83dfa76..aece3ac4 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java @@ -113,11 +113,13 @@ public class SimulationViewEditor extends EditorPart if (((CoreClock) o).isOn()) { exec.pauseLiveExecution(); - Display.getDefault().asyncExec(() -> - { - pauseButton.setSelection(false); - setPauseText(pauseButton, false); - }); + if (!pauseButton.isDisposed()) + Display.getDefault().asyncExec(() -> + { + if (!pauseButton.isDisposed()) + pauseButton.setSelection(false); + setPauseText(pauseButton, false); + }); } };