From 98d788b6df2e95725e2435fff8469deb3ff74e8c Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Thu, 6 Feb 2020 19:51:58 -0600 Subject: fix ~ allow `nil` taskmenu (may be empty for xmake recipes with solely internal tasks) --- xmake/core/base/option.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1