Skip to content

Commit

Permalink
Merge pull request #67 from KostyaSha/fixNPE
Browse files Browse the repository at this point in the history
[JENKINS-29787] Fix NPE for race condition(?).
  • Loading branch information
KostyaSha committed Aug 10, 2015
2 parents a8dc555 + 18aca71 commit cc84ef4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/com/cloudbees/jenkins/GitHubPushTrigger.java
Original file line number Diff line number Diff line change
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 cc84ef4

Please sign in to comment.