aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_content/pdf.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/lualib/lua_content/pdf.lua b/lualib/lua_content/pdf.lua
index f29e1e781..741c011bd 100644
--- a/lualib/lua_content/pdf.lua
+++ b/lualib/lua_content/pdf.lua
@@ -386,8 +386,9 @@ local function process_dict(task, pdf, obj, dict)
lua_util.debugm(N, task, 'process stream dictionary for object %s:%s -> %s',
obj.major, obj.minor, obj.type)
local contents = dict.Contents
- if contents then
- if type(contents) == 'table' and contents[1] == '%REF%' then
+ if contents and type(contents) == 'table' then
+ if contents[1] == '%REF%' then
+ -- Single reference
contents = {contents}
end
obj.contents = {}