issue #169: make sure ldoc is not nil before checking config

This commit is contained in:
Steve Donovan 2014-10-01 16:02:38 +02:00
parent c34957cd16
commit 2778e043ed
1 changed files with 2 additions and 2 deletions

View File

@ -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