Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Ratz2017-05-15 05:51:44 -0400
committerAndrey Loskutov2017-05-15 07:33:05 -0400
commit1a3f28dbf5df7c64d31b8e3f2bfeaa70cf06aeda (patch)
tree6056d88faa7d054df8afa3504737c2de08e6a1c3
parent8eba2421be077d94ba9f58581e2eb5890c949033 (diff)
downloadeclipse.platform.team-1a3f28dbf5df7c64d31b8e3f2bfeaa70cf06aeda.tar.gz
eclipse.platform.team-1a3f28dbf5df7c64d31b8e3f2bfeaa70cf06aeda.tar.xz
eclipse.platform.team-1a3f28dbf5df7c64d31b8e3f2bfeaa70cf06aeda.zip
Bug 516644 - [regression] NPE inI20170515-0910
org.eclipse.team.internal.ui.history.CompareFileRevisionEditorInput.getResource(ICompareInput) Fix NPE in CompareFileRevisionEditorInput Accidentally introduced in 30ce23c898392ba97114d8ba7cf5eddd7a0d6373. A null check is still necessary. Change-Id: Iac381eea4a17f67bd7cbe9b6289643ecd35377cb Signed-off-by: Sebastian Ratz <sebastian.ratz@sap.com> Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
index 6360fff9a..aaaa4642d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/CompareFileRevisionEditorInput.java
@@ -150,7 +150,11 @@ public class CompareFileRevisionEditorInput extends SaveableCompareEditorInput {
}
private IResource getResource(ICompareInput input) {
- return getLocalElement().getResource();
+ LocalResourceTypedElement localElement = getLocalElement();
+ if (localElement != null) {
+ return localElement.getResource();
+ }
+ return null;
}
private ICompareInput createCompareInput() {

Back to the top