Fix potential null pointer access in IndexDiffFilter

Change-Id: I39c2ea6b3090d7028cc1e246af6e3cc4e7bc70c2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2015-04-11 23:56:41 +02:00
parent bb48901ddf
commit d5a34551d5
1 changed files with 2 additions and 1 deletions

View File

@ -224,7 +224,8 @@ public boolean include(TreeWalk tw) throws MissingObjectException,
// 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());
}
/**