Skip to content

Commit

Permalink
StepAvailable: if 'step' is null, return false
Browse files Browse the repository at this point in the history
  • Loading branch information
josteinaj authored and ndw committed Apr 6, 2017
1 parent 6b286b1 commit 676183a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/xmlcalabash/functions/StepAvailable.java
Expand Up @@ -95,6 +95,9 @@ public Sequence call(XPathContext xPathContext, Sequence[] sequences) throws XPa


XProcRuntime runtime = registry.getRuntime(xdef); XProcRuntime runtime = registry.getRuntime(xdef);
XStep step = runtime.getXProcData().getStep(); XStep step = runtime.getXProcData().getStep();
if (step == null) {
return BooleanValue.FALSE;
}
// FIXME: this can't be the best way to do this... // FIXME: this can't be the best way to do this...
// step == null in use-when // step == null in use-when
if (step != null && !(step instanceof XCompoundStep)) { if (step != null && !(step instanceof XCompoundStep)) {
Expand Down

0 comments on commit 676183a

Please sign in to comment.