Fix potential null pointer access in IndexDiffFilter
Change-Id: I39c2ea6b3090d7028cc1e246af6e3cc4e7bc70c2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
bb48901ddf
commit
d5a34551d5
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue