summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/manager/RepositoryManager.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2015-11-18 09:19:23 -0500
committerJames Moger <james.moger@gitblit.com>2015-11-18 09:19:23 -0500
commitdef01db5f7dc1c607026528eed1dfd75c6e59779 (patch)
treecab9723080b64ec3c5399854417b1202fcbf5b2d /src/main/java/com/gitblit/manager/RepositoryManager.java
parent6069be20b5ebb786a1b890fa9c91350ffd355b0f (diff)
downloadgitblit-def01db5f7dc1c607026528eed1dfd75c6e59779.tar.gz
gitblit-def01db5f7dc1c607026528eed1dfd75c6e59779.zip
Catch some potential NPEs
Diffstat (limited to 'src/main/java/com/gitblit/manager/RepositoryManager.java')
-rw-r--r--src/main/java/com/gitblit/manager/RepositoryManager.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/manager/RepositoryManager.java b/src/main/java/com/gitblit/manager/RepositoryManager.java
index 027ba23b..e2e4de68 100644
--- a/src/main/java/com/gitblit/manager/RepositoryManager.java
+++ b/src/main/java/com/gitblit/manager/RepositoryManager.java
@@ -1113,9 +1113,16 @@ public class RepositoryManager implements IRepositoryManager {
// find the root, cached
String key = getRepositoryKey(repository);
RepositoryModel model = repositoryListCache.get(key);
+ if (model == null) {
+ return null;
+ }
+
while (model.originRepository != null) {
String originKey = getRepositoryKey(model.originRepository);
model = repositoryListCache.get(originKey);
+ if (model == null) {
+ return null;
+ }
}
ForkModel root = getForkModelFromCache(model.name);
return root;