diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index f70499f..0af8cd1 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -1303,7 +1303,7 @@ function _M.saveGeniusTreeRpc(agent, data) if not hero then print("hero is nil") return 0 end - if wakeL > hero:getProperty("wakeL") then return 1 end + if wakeL and wakeL > hero:getProperty("wakeL") then return 1 end local genius = hero:saveGeniusTree(wakeL, awake) if #genius == 0 then -- libgit2 0.21.2