summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/rules/protobuf/proto.lua2
1 files changed, 1 insertions, 1 deletions
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