From 49035ed33f8f6f76749baa9feceda708881935ee Mon Sep 17 00:00:00 2001 From: UdoW <12225215+UdoW@users.noreply.github.com> Date: Mon, 26 Nov 2018 11:51:43 +0100 Subject: [PATCH] Fixes NPE in dispose() method After calling super.dispose() the site is set to null which causes a NPE in the call getSite().getPage(). Changed order of calls. --- .../sweetlemonade/eclipse/json/outline/JsonOutlinePage.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/JsonEditor/src/org/sweetlemonade/eclipse/json/outline/JsonOutlinePage.java b/JsonEditor/src/org/sweetlemonade/eclipse/json/outline/JsonOutlinePage.java index c89eead..f84c0e5 100644 --- a/JsonEditor/src/org/sweetlemonade/eclipse/json/outline/JsonOutlinePage.java +++ b/JsonEditor/src/org/sweetlemonade/eclipse/json/outline/JsonOutlinePage.java @@ -58,9 +58,9 @@ public void createControl(Composite parent) @Override public void dispose() { - super.dispose(); - getSite().getPage().removePostSelectionListener(this); + + super.dispose(); } @Override @@ -127,4 +127,4 @@ public void selectionChanged(IWorkbenchPart part, ISelection selection) } } } -} \ No newline at end of file +}