From 9793855caf01d4ce9740dd99971e771cca6715a6 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 13 Jun 2014 08:22:27 -0400 Subject: Fix NPE in GitblitClient --- src/main/java/com/gitblit/client/GitblitClient.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/com/gitblit/client/GitblitClient.java b/src/main/java/com/gitblit/client/GitblitClient.java index 66625a8e..f5bba1ad 100644 --- a/src/main/java/com/gitblit/client/GitblitClient.java +++ b/src/main/java/com/gitblit/client/GitblitClient.java @@ -253,9 +253,11 @@ public class GitblitClient implements Serializable { // create list of available scripts by excluding inherited scripts List scripts = new ArrayList(); - for (String script : settings.pushScripts) { - if (!inherited.contains(script)) { - scripts.add(script); + if (!ArrayUtils.isEmpty(settings.pushScripts)) { + for (String script : settings.pushScripts) { + if (!inherited.contains(script)) { + scripts.add(script); + } } } return scripts; -- cgit v1.2.3