Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2017-01-17 16:58:59 -0500
committerSergey Prigogin2017-01-17 17:00:12 -0500
commit9966403dfd6224f510a7a536422ffb7920c51db0 (patch)
treedacc31cf8a77ba9580925bdd3541d73d584bcc9a /bundles
parentb69a1495693bc4f83e22f77624dcdd964b34ffd3 (diff)
downloadeclipse.platform.team-9966403dfd6224f510a7a536422ffb7920c51db0.tar.gz
eclipse.platform.team-9966403dfd6224f510a7a536422ffb7920c51db0.tar.xz
eclipse.platform.team-9966403dfd6224f510a7a536422ffb7920c51db0.zip
Bug 347558 - Avoid passing null to listenerList#remove
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
index 8d988636a..852901c23 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java
@@ -231,13 +231,12 @@ public abstract class SaveableCompareEditorInput extends CompareEditorInput impl
super.handleDispose();
ICompareInput compareInput = getCompareInput();
if (compareInput != null) {
- if (Policy.DEBUG_COMPARE_EDITOR_INPUT) {
- if (compareInputChangeListener == null) {
- logTrace("null change listener detected!"); //$NON-NLS-1$
- logStackTrace();
- }
+ if (compareInputChangeListener != null) {
+ compareInput.removeCompareInputChangeListener(compareInputChangeListener);
+ } else if (Policy.DEBUG_COMPARE_EDITOR_INPUT) {
+ logTrace("compareInputChangeListener is unexpectedly null!"); //$NON-NLS-1$
+ logStackTrace();
}
- compareInput.removeCompareInputChangeListener(compareInputChangeListener);
}
if (Policy.DEBUG_COMPARE_EDITOR_INPUT) {
logTrace("compareInputChangeListener = null"); //$NON-NLS-1$

Back to the top