Skip to content

Commit

Permalink
[FIXED JENKINS-29787] Fix NPE for race condition.
Browse files Browse the repository at this point in the history
See JENKINS-29794 for details.
  • Loading branch information
KostyaSha committed Aug 5, 2015
1 parent 9723aab commit 18aca71
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/com/cloudbees/jenkins/GitHubPushTrigger.java
Expand Up @@ -157,6 +157,10 @@ public void registerHooks() {

@Override
public void stop() {
if (job == null) {
return;
}

if (getDescriptor().isManageHook()) {
Cleaner cleaner = Cleaner.get();
if (cleaner != null) {
Expand All @@ -167,6 +171,10 @@ public void stop() {

@Override
public Collection<? extends Action> getProjectActions() {
if (job == null) {
return Collections.emptyList();
}

return Collections.singleton(new GitHubWebHookPollingAction());
}

Expand Down

0 comments on commit 18aca71

Please sign in to comment.