Fix null ref exception in DirCacheCheckout

Added missing null check for getDirCacheEntry(). This method may
return null for example if the curernt entry is a subtree.
This commit is contained in:
Lluis Sanchez 2010-11-10 10:39:48 +01:00
parent 17b1003ff2
commit 3b4dcb3c02
1 changed files with 3 additions and 2 deletions

View File

@ -274,8 +274,9 @@ void processEntry(CanonicalTreeParser m, DirCacheBuildIterator i,
WorkingTreeIterator f) {
if (m != null) {
if (i == null || f == null || !m.idEqual(i)
|| f.isModified(i.getDirCacheEntry(), true,
config_filemode(), repo.getFS())) {
|| (i.getDirCacheEntry() != null && f.isModified(i
.getDirCacheEntry(), true, config_filemode(), repo
.getFS()))) {
update(m.getEntryPathString(), m.getEntryObjectId(),
m.getEntryFileMode());
} else