summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2013-09-01 19:58:28 +0200
committerRobin Rosenberg <robin.rosenberg@dewire.com>2013-09-01 19:58:28 +0200
commit86dca9da11d66aba2104ab64fbe3affb5ebf0ff4 (patch)
treee1646d53de823c7d79db9c69f717b9ce581664ba /src/main
parent02ede7f11c6fb28ca53fc240905cd1b140236f08 (diff)
downloadgitblit-86dca9da11d66aba2104ab64fbe3affb5ebf0ff4.tar.gz
gitblit-86dca9da11d66aba2104ab64fbe3affb5ebf0ff4.zip
Don't crash with an NPE when the cache contains removed repositoried
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/gitblit/GitBlit.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index 6ea348d5..111e5951 100644
--- a/src/main/java/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
@@ -3603,7 +3603,7 @@ public class GitBlit implements ServletContextListener {
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)) {