Skip to content

Commit

Permalink
[JENKINS-44548] NPE from loadProgramFailed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Jul 27, 2017
1 parent bc0a768 commit fc4c453
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 fc4c453

Please sign in to comment.