From: Fabian Stemmler Date: Sun, 6 Oct 2019 22:01:39 +0000 (+0200) Subject: Added null check in dispose() of InstructionView X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=dc1778bb67daef92fb4ef16c5bba5395f6914eda;p=Mograsim.git Added null check in dispose() of InstructionView If editor fails to initialize, memory is still null when dispose is called. --- diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java index 1da1cbff..214bd8ce 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java @@ -232,7 +232,8 @@ public class InstructionView extends EditorPart @Override public void dispose() { - memory.deregisterCellModifiedListener(cellModifiedListener); + if (memory != null) + memory.deregisterCellModifiedListener(cellModifiedListener); super.dispose(); }