1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

Bug 543129 - NPE in GdbFullCliConsolePage.dispose()

With the fix for bug 536677, disposing a org.eclipse.ui.part.Page will
dispose also its site.
org.eclipse.cdt.dsf.gdb.internal.ui.console.GdbFullCliConsolePage.dispose()
calls super.dispose() and then accesses the page site, which results in
a NPE.

This change changes the order of disposal to the natural order,
extending class first and then the super.

Change-Id: I853c8c426b9ea4e1403cd9af34f9878f6379f72a
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
This commit is contained in:
Simeon Andreev 2019-02-14 16:11:43 +01:00
parent 31b4c257b1
commit db1326bbb3
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName Bundle-Name: %pluginName
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true
Bundle-Version: 2.6.2.qualifier Bundle-Version: 2.6.100.qualifier
Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin
Bundle-Localization: plugin Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui, Require-Bundle: org.eclipse.ui,

View file

@ -120,12 +120,12 @@ public class GdbFullCliConsolePage extends Page implements IDebugContextListener
@Override @Override
public void dispose() { public void dispose() {
super.dispose();
DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow()) DebugUITools.getDebugContextManager().getContextService(getSite().getWorkbenchWindow())
.removeDebugContextListener(this); .removeDebugContextListener(this);
fTerminalControl.disposeTerminal(); fTerminalControl.disposeTerminal();
fMenuManager.dispose(); fMenuManager.dispose();
GdbUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPreferenceListener); GdbUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(fPreferenceListener);
super.dispose();
} }
@Override @Override