diff --git a/ldoc/doc.lua b/ldoc/doc.lua index 4d3dfd6..9a0e34f 100644 --- a/ldoc/doc.lua +++ b/ldoc/doc.lua @@ -1103,7 +1103,7 @@ function Module:process_see_reference (s,modules,istype) lua_manual_ref = global.lua_manual_ref end -- pure C projects use global lookup (no namespaces) - if ldoc.global_lookup == nil then + if ldoc and ldoc.global_lookup == nil then local using_c = ldoc.parse_extra and ldoc.parse_extra.C ldoc.global_lookup = using_c or false end @@ -1149,7 +1149,7 @@ function Module:process_see_reference (s,modules,istype) end end else -- plain jane name; module in this package, function in this module - if ldoc.global_lookup then + if ldoc and ldoc.global_lookup then for m in modules:iter() do fun_ref = m:get_fun_ref(s) if fun_ref then return reference(s,m,fun_ref) end