Skip to content

Commit

Permalink
[Fixed JENKINS-25313] fix null pointer exception when last repo or br…
Browse files Browse the repository at this point in the history
…anch deleted
  • Loading branch information
MarkEWaite committed Oct 28, 2014
1 parent 0c54946 commit 247f03f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/hudson/plugins/git/GitSCM.java
Expand Up @@ -208,6 +208,9 @@ public DescribableList<GitSCMExtension, GitSCMExtensionDescriptor> getExtensions

private void updateFromUserData() throws GitException {
// do what newInstance used to do directly from the request data
if (userRemoteConfigs == null) {
return; /* Prevent NPE when no remote config defined */
}
try {
String[] pUrls = new String[userRemoteConfigs.size()];
String[] repoNames = new String[userRemoteConfigs.size()];
Expand Down

0 comments on commit 247f03f

Please sign in to comment.