From b57d3e7e34d98042533369790d9f51462b04f9c0 Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 11 Dec 2013 11:01:37 -0500 Subject: [PATCH] Fix NPE in getting a user's fork if repository caching is disabled Change-Id: I10e90f54964daa32d954b47a8a6d54267b215222 --- src/main/java/com/gitblit/manager/RepositoryManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/manager/RepositoryManager.java b/src/main/java/com/gitblit/manager/RepositoryManager.java index d24a06db..afa96b20 100644 --- a/src/main/java/com/gitblit/manager/RepositoryManager.java +++ b/src/main/java/com/gitblit/manager/RepositoryManager.java @@ -979,7 +979,7 @@ public class RepositoryManager implements IRepositoryManager { settings.getStrings(Keys.git.searchExclusions)); for (String repository : repositories) { RepositoryModel model = getRepositoryModel(userProject + "/" + repository); - if (model.originRepository.equalsIgnoreCase(origin)) { + if (model.originRepository != null && model.originRepository.equalsIgnoreCase(origin)) { // user has a fork return model.name; } -- 2.39.5