libunitscan: make sure to have a valid db

This commit is contained in:
shagu
2021-10-11 20:45:17 +02:00
parent 86603b0738
commit 43a824609a
+1 -1
View File
@@ -45,7 +45,7 @@ function GetUnitData(name, active)
end
local function AddData(db, name, class, level, elite)
if not name then return end
if not name or not db then return end
units[db][name] = units[db][name] or {}
units[db][name].class = class or units[db][name].class
units[db][name].level = level or units[db][name].level