From ecaa9738b2f784f69009ca7902855f3528c08af9 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 20 Jan 2024 23:49:52 +0800 Subject: fix platform error --- xmake/core/platform/platform.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xmake/core/platform/platform.lua b/xmake/core/platform/platform.lua index 180e5401e..4a4b4bf96 100644 --- a/xmake/core/platform/platform.lua +++ b/xmake/core/platform/platform.lua @@ -157,11 +157,13 @@ function _instance:runtimes() elseif self:name() == "android" then runtimes = runtimes or config.get("ndk_cxxstl") end - runtimes = runtimes:split(",", {plain = true}) - if #runtimes > 0 then - runtimes = table.unwrap(runtimes) - else - runtimes = nil + if runtimes then + runtimes = runtimes:split(",", {plain = true}) + if #runtimes > 0 then + runtimes = table.unwrap(runtimes) + else + runtimes = nil + end end runtimes = runtimes or false self:_memcache():set("runtimes", runtimes) -- cgit v1.3.1