Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LuaRules/Utilities/unitTypeChecker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ local isComm = {}
function Spring.Utilities.isComm(unitDefID)
if not isComm[unitDefID] then
local ud = UnitDefs[unitDefID]
isComm[unitDefID] = (ud.customParams.dynamic_comm or ud.customParams.commtype) and 1 or 0
isComm[unitDefID] = ud and ud.customParams and (ud.customParams.dynamic_comm or ud.customParams.commtype) and 1 or 0
end
return isComm[unitDefID] == 1
end
Expand Down