Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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