From dc1778bb67daef92fb4ef16c5bba5395f6914eda Mon Sep 17 00:00:00 2001 From: Fabian Stemmler Date: Mon, 7 Oct 2019 00:01:39 +0200 Subject: [PATCH] Added null check in dispose() of InstructionView If editor fails to initialize, memory is still null when dispose is called. --- .../src/net/mograsim/plugin/tables/mi/InstructionView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } -- 2.17.1