]> source.dussan.org Git - gitblit.git/commitdiff
Fix NPE in getting a user's fork if repository caching is disabled
authorJames Moger <james.moger@gitblit.com>
Wed, 11 Dec 2013 16:01:37 +0000 (11:01 -0500)
committerJames Moger <james.moger@gitblit.com>
Wed, 11 Dec 2013 16:01:37 +0000 (11:01 -0500)
Change-Id: I10e90f54964daa32d954b47a8a6d54267b215222

src/main/java/com/gitblit/manager/RepositoryManager.java

index d24a06db9814fcfdc21432c61b257cfe3e7c414f..afa96b20549e6c3314b5ebf4aca244b512d8e05b 100644 (file)
@@ -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;
                                }