Skip to content

Commit

Permalink
Merge pull request #314 from alonbl/JENKINS-38542
Browse files Browse the repository at this point in the history
[JENKINS-38542] NPE when canceling a task when no job
  • Loading branch information
rsandell committed Jun 9, 2017
2 parents 35a03f0 + 1d32470 commit e0ad9f1
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -550,7 +550,11 @@ public static GerritTrigger getTrigger(@Nullable Job project) {
*/
public void cancelTimer() {
if (gerritTriggerTimerTask != null) {
logger.trace("GerritTrigger.cancelTimer(): {0}", job.getName());
String name = "N/A";
if (job != null) {
name = job.getName();
}
logger.trace("GerritTrigger.cancelTimer(): {}", name);
gerritTriggerTimerTask.cancel();
gerritTriggerTimerTask = null;
}
Expand Down

0 comments on commit e0ad9f1

Please sign in to comment.