aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Thun2011-02-24 09:09:11 (EST)
committerPhilipp Thun2011-02-24 10:54:52 (EST)
commit69a488e54619713aa9258c144e2b3755f64e5c98 (patch)
treed842b5ef4c4347ef2df9bcd0441214aaab03e91b
parent1b3f17cad726277c8320cb46318ba45dc4d1f460 (diff)
downloadegit-69a488e54619713aa9258c144e2b3755f64e5c98.zip
egit-69a488e54619713aa9258c144e2b3755f64e5c98.tar.gz
egit-69a488e54619713aa9258c144e2b3755f64e5c98.tar.bz2
Fix NPE in DropAdapterAssistantrefs/changes/93/2593/1
This change fixes a possible NullPointerException in class DropAdapterAssistant. Bug: 336983 Change-Id: Ib1828a4c9ccc72b1190dca13054ae250badb95d1 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/DropAdapterAssistant.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/DropAdapterAssistant.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/DropAdapterAssistant.java
index 91bfbf1..a985dda 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/DropAdapterAssistant.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/DropAdapterAssistant.java
@@ -62,6 +62,8 @@ public class DropAdapterAssistant extends CommonDropAdapterAssistant {
// check that all paths are valid repository paths
String[] folders = (String[]) FileTransfer.getInstance().nativeToJava(
transferData);
+ if (folders == null)
+ return Status.CANCEL_STATUS;
for (String folder : folders) {
File repoFile = new File(folder);
if (FileKey.isGitRepository(repoFile, FS.DETECTED)) {