Added null check in dispose() of InstructionView
authorFabian Stemmler <stemmler@in.tum.de>
Sun, 6 Oct 2019 22:01:39 +0000 (00:01 +0200)
committerFabian Stemmler <stemmler@in.tum.de>
Wed, 9 Oct 2019 10:52:41 +0000 (12:52 +0200)
If editor fails to initialize, memory is still null when dispose is
called.

plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionView.java

index 1da1cbf..214bd8c 100644 (file)
@@ -232,7 +232,8 @@ public class InstructionView extends EditorPart
        @Override
        public void dispose()
        {
-               memory.deregisterCellModifiedListener(cellModifiedListener);
+               if (memory != null)
+                       memory.deregisterCellModifiedListener(cellModifiedListener);
                super.dispose();
        }