summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Ivy III <[email protected]>2020-02-06 19:51:58 -0600
committerRoy Ivy III <[email protected]>2020-02-06 20:14:16 -0600
commit98d788b6df2e95725e2435fff8469deb3ff74e8c (patch)
treea1184381f7e3a55d4f88daa1bb7010f9126939e4
parentc1262215a240eefc46a97b88ec3086e0c55947e3 (diff)
fix ~ allow `nil` taskmenu (may be empty for xmake recipes with solely internal tasks)
-rw-r--r--xmake/core/base/option.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua
index 4fa61ad12..36ed4b657 100644
--- a/xmake/core/base/option.lua
+++ b/xmake/core/base/option.lua
@@ -446,7 +446,9 @@ function option.defaults(task)
-- get the default options for the given task
local defaults = {}
- option.populate_defaults(taskmenu.options, defaults)
+ if taskmenu then
+ option.populate_defaults(taskmenu.options, defaults)
+ end
return defaults
end