diff options
author | Sergey Prigogin | 2017-01-17 21:58:59 +0000 |
---|---|---|
committer | Sergey Prigogin | 2017-01-17 22:00:12 +0000 |
commit | 9966403dfd6224f510a7a536422ffb7920c51db0 (patch) | |
tree | dacc31cf8a77ba9580925bdd3541d73d584bcc9a | |
parent | b69a1495693bc4f83e22f77624dcdd964b34ffd3 (diff) | |
download | eclipse.platform.team-9966403dfd6224f510a7a536422ffb7920c51db0.tar.gz eclipse.platform.team-9966403dfd6224f510a7a536422ffb7920c51db0.tar.xz eclipse.platform.team-9966403dfd6224f510a7a536422ffb7920c51db0.zip |
Bug 347558 - Avoid passing null to listenerList#remove
Change-Id: Ia83a4d99bd4db38095b88ec7fc593b3cb7831616
-rw-r--r-- | bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SaveableCompareEditorInput.java | 11 |
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$ |