summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-06-13 08:22:27 -0400
committerJames Moger <james.moger@gitblit.com>2014-06-13 08:22:27 -0400
commit9793855caf01d4ce9740dd99971e771cca6715a6 (patch)
tree1a1891a83d971ebb9941d19602834d9dd296d402 /src
parent845271c3c738f1b3b2aab5d3ad4c657adda3b960 (diff)
downloadgitblit-9793855caf01d4ce9740dd99971e771cca6715a6.tar.gz
gitblit-9793855caf01d4ce9740dd99971e771cca6715a6.zip
Fix NPE in GitblitClient
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/client/GitblitClient.java8
1 files changed, 5 insertions, 3 deletions
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<String> scripts = new ArrayList<String>();
- 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;