Fix a bug in factions_ui when name is nil

master
Solebull 2020-08-16 13:28:10 +02:00
parent dac9d2e41c
commit fd2f2fe658
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,11 @@ factions.maximum_faction_inactivity = 604800 -- 1 week
--! @brief returns whether a faction can be created or not (allows for implementation of blacklists and the like)
--! @param name String containing the faction's name
factions.can_create_faction = function(name)
-- Can't create faction with nil name
if name == nil or name == '' then
return false
end
if #name > factions.faction_name_max_length then
return false
elseif factions.factions[name] then