summaryrefslogtreecommitdiff
path: root/tex/context/base/lxml-lpt.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/lxml-lpt.lua')
-rw-r--r--tex/context/base/lxml-lpt.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua
index 8f7d60d9e..ffa2edf3e 100644
--- a/tex/context/base/lxml-lpt.lua
+++ b/tex/context/base/lxml-lpt.lua
@@ -956,13 +956,17 @@ local function parse_apply(list,pattern)
end
local nofparsed = #parsed
if nofparsed == 0 then
- -- something is wrong
+ return -- something is wrong
+ end
+ local one = list[1]
+ if not one then
+ return -- something is wrong
elseif not trace_lpath then
- return normal_apply(list,parsed,nofparsed,list[1].mi)
+ return normal_apply(list,parsed,nofparsed,one.mi)
elseif trace_lprofile then
- return profiled_apply(list,parsed,nofparsed,list[1].mi)
- else -- trace_lpath
- return traced_apply(list,parsed,nofparsed,list[1].mi)
+ return profiled_apply(list,parsed,nofparsed,one.mi)
+ else
+ return traced_apply(list,parsed,nofparsed,one.mi)
end
end