We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 447a629 commit 8295200Copy full SHA for 8295200
1 file changed
LuaRules/Utilities/unitTypeChecker.lua
@@ -60,7 +60,11 @@ local isComm = {}
60
function Spring.Utilities.isComm(unitDefID)
61
if not isComm[unitDefID] then
62
local ud = UnitDefs[unitDefID]
63
- isComm[unitDefID] = (ud.customParams.dynamic_comm or ud.customParams.commtype) and 1 or 0
+ if ud ~= nil then
64
+ isComm[unitDefID] = (ud.customParams.dynamic_comm or ud.customParams.commtype) and 1 or 0
65
+ else
66
+ isComm[unitDefID] = 0
67
+ end
68
end
69
return isComm[unitDefID] == 1
70
0 commit comments