summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/manager/RepositoryManager.java7
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ForksPage.java3
2 files changed, 10 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;
diff --git a/src/main/java/com/gitblit/wicket/pages/ForksPage.java b/src/main/java/com/gitblit/wicket/pages/ForksPage.java
index 93fc9faf..045f5f7e 100644
--- a/src/main/java/com/gitblit/wicket/pages/ForksPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ForksPage.java
@@ -136,6 +136,9 @@ public class ForksPage extends RepositoryPage {
protected List<FlatFork> flatten(ForkModel node, int level) {
List<FlatFork> list = new ArrayList<FlatFork>();
+ if (node == null) {
+ return list;
+ }
list.add(new FlatFork(node.repository, level));
if (!node.isLeaf()) {
for (ForkModel fork : node.forks) {