Browse Source

Fix potential null pointer access in IndexDiffFilter

Change-Id: I39c2ea6b3090d7028cc1e246af6e3cc4e7bc70c2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.1
Matthias Sohn 10 years ago
parent
commit
d5a34551d5
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java

3
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java

@ -224,7 +224,8 @@ public class IndexDiffFilter extends TreeFilter {
// Only one chance left to detect a diff: between index and working
// tree. Make use of the WorkingTreeIterator#isModified() method to
// avoid computing SHA1 on filesystem content if not really needed.
return wi.isModified(di.getDirCacheEntry(), true, tw.getObjectReader());
return wi.isModified(di == null ? null : di.getDirCacheEntry(), true,
tw.getObjectReader());
}
/**

Loading…
Cancel
Save