summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/scanner.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/c++/modules/scanner.lua')
-rw-r--r--xmake/rules/c++/modules/scanner.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/scanner.lua b/xmake/rules/c++/modules/scanner.lua
index efbaa20c3..dcb4f22b8 100644
--- a/xmake/rules/c++/modules/scanner.lua
+++ b/xmake/rules/c++/modules/scanner.lua
@@ -421,7 +421,7 @@ function _do_parse(target, sourcebatch)
cxx_sourcebatch.dependfiles = {}
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
local module = mapper.get(target, sourcefile)
- if not module.interface and not module.implementation then
+ if module and not module.interface and not module.implementation then
table.insert(cxx_sourcebatch.sourcefiles, sourcefile)
local objectfile = target:objectfile(sourcefile)
table.insert(cxx_sourcebatch.dependfiles, target:dependfile(objectfile))