From 6c973f55a3130fe62342e4ab06e992eac6ee3a80 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 4 Oct 2024 22:36:49 +0800 Subject: fix protobuf rule --- xmake/rules/protobuf/proto.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/rules/protobuf/proto.lua b/xmake/rules/protobuf/proto.lua index e5208709c..c35ffb697 100644 --- a/xmake/rules/protobuf/proto.lua +++ b/xmake/rules/protobuf/proto.lua @@ -67,7 +67,7 @@ end function load(target, sourcekind) local sourcebatch = target:sourcebatches()[sourcekind == "cxx" and "protobuf.cpp" or "protobuf.c"] - for _, sourcefile_proto in ipairs(sourcebatch.sourcefiles) do + for _, sourcefile_proto in ipairs(sourcebatch and sourcebatch.sourcefiles) do local prefixdir local autogendir local public -- cgit v1.3.1