summaryrefslogtreecommitdiff
path: root/tex/context/base/node-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/node-ini.lua')
-rw-r--r--tex/context/base/node-ini.lua26
1 files changed, 15 insertions, 11 deletions
diff --git a/tex/context/base/node-ini.lua b/tex/context/base/node-ini.lua
index 21e7bc8cb..a29af830b 100644
--- a/tex/context/base/node-ini.lua
+++ b/tex/context/base/node-ini.lua
@@ -348,18 +348,22 @@ function nodes.reference(n)
end
function nodes.link(n,...) -- blobs ?
- if type(n) ~= "table" then
- n = { n, ... }
- end
- local head = n[1]
- local tail = slide_nodes(head)
- for i=2,#n do
- local ni = n[i]
- tail.next = ni
- ni.prev = tail
- tail = slide_nodes(ni)
+ if n then
+ if type(n) ~= "table" then
+ n = { n, ... }
+ end
+ local head = n[1]
+ local tail = slide_nodes(head)
+ for i=2,#n do
+ local ni = n[i]
+ tail.next = ni
+ ni.prev = tail
+ tail = slide_nodes(ni)
+ end
+ return head
+ else
+ -- sort of fatal error
end
- return head
end
--