Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-04-29 18:48:55 +0000
committerMichael Valenta2004-04-29 18:48:55 +0000
commit3c0525392afc3efa5e6ee0e0696f6b89f232d86c (patch)
treebe17d7ec3a51c9087475e0fcf5d25429bcb89562
parentd6fd0a4035d7473ddc086abea8f51be7dd6a97f8 (diff)
downloadeclipse.platform.team-3c0525392afc3efa5e6ee0e0696f6b89f232d86c.tar.gz
eclipse.platform.team-3c0525392afc3efa5e6ee0e0696f6b89f232d86c.tar.xz
eclipse.platform.team-3c0525392afc3efa5e6ee0e0696f6b89f232d86c.zip
Bug 59960: NPE comparing
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java
index 0b8fede68..a77e1568c 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/ResourceEditionNode.java
@@ -17,6 +17,7 @@ import java.lang.reflect.InvocationTargetException;
import org.eclipse.compare.*;
import org.eclipse.compare.structuremergeviewer.IStructureComparator;
+import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -98,7 +99,10 @@ public class ResourceEditionNode implements IStructureComparator, ITypedElement,
CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
- holder[0] = ((IResourceVariant)resource).getStorage(monitor).getContents();
+ IStorage storage = ((IResourceVariant)resource).getStorage(monitor);
+ if (storage != null) {
+ holder[0] = storage.getContents();
+ }
} catch (TeamException e) {
throw new InvocationTargetException(e);
} catch (CoreException e) {

Back to the top