Skip to content

Commit

Permalink
Merge pull request #158 from jglick/NPE-JENKINS-44548
Browse files Browse the repository at this point in the history
[JENKINS-44548] NPE from loadProgramFailed
  • Loading branch information
svanoort committed Jul 31, 2017
2 parents bc0a768 + fc4c453 commit 7d85ae7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main/java/org/jenkinsci/plugins/workflow/cps/FlowHead.java
Expand Up @@ -94,13 +94,15 @@ public CpsFlowExecution getExecution() {
}

void newStartNode(FlowStartNode n) throws IOException {
for (Action a : execution.flowStartNodeActions) {
if (a instanceof FlowNodeAction) {
((FlowNodeAction) a).onLoad(n);
if (execution.flowStartNodeActions != null) {
for (Action a : execution.flowStartNodeActions) {
if (a instanceof FlowNodeAction) {
((FlowNodeAction) a).onLoad(n);
}
n.addAction(a);
}
n.addAction(a);
}
execution.flowStartNodeActions.clear();
execution.flowStartNodeActions.clear();
} // may be unset from loadProgramFailed
synchronized (execution) {
this.head = execution.startNodes.push(n);
}
Expand Down

0 comments on commit 7d85ae7

Please sign in to comment.