diff --git a/src/models/RolePlugin.lua b/src/models/RolePlugin.lua index 9959dab..3573383 100644 --- a/src/models/RolePlugin.lua +++ b/src/models/RolePlugin.lua @@ -94,11 +94,13 @@ function RolePlugin.bind(Role) local items = self:getProperty("items"):toNumMap() for id ,_ in pairs(items) do local tempData = csvdb["itemCsv"][id] - if globalCsv.store_type[tempData.type] == page then - curCount = curCount + 1 - if curCount >= limit then - count = 0 - break + if tempData then + if globalCsv.store_type[tempData.type] == page then + curCount = curCount + 1 + if curCount >= limit then + count = 0 + break + end end end end -- libgit2 0.21.2