Robin Rosenberg
2013-09-01 86dca9da11d66aba2104ab64fbe3affb5ebf0ff4
Don't crash with an NPE when the cache contains removed repositoried
1 files modified
2 ■■■ changed files
src/main/java/com/gitblit/GitBlit.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/gitblit/GitBlit.java
@@ -3603,7 +3603,7 @@
            Date cutoff = CommitCache.instance().getCutoffDate();
            for (String repositoryName : getRepositoryList()) {
                RepositoryModel model = getRepositoryModel(repositoryName);
                if (model.hasCommits && model.lastChange.after(cutoff)) {
                if (model != null && model.hasCommits && model.lastChange.after(cutoff)) {
                    repoCount++;
                    Repository repository = getRepository(repositoryName);
                    for (RefModel ref : JGitUtils.getLocalBranches(repository, true, -1)) {