added missing nil check

This commit is contained in:
tenplus1 2020-12-25 19:11:16 +00:00
parent 5672606432
commit 6bca4ffdff
1 changed files with 4 additions and 2 deletions

View File

@ -177,8 +177,10 @@ local protector_formspec = function(meta)
checkbox_faction = true
end
else
if next(factions.get_player_faction(meta:get_string("owner"))) then
checkbox_faction = true
if factions.get_player_factions(meta:get_string("owner")) ~= nil then
if next(factions.get_player_faction(meta:get_string("owner"))) then
checkbox_faction = true
end
end
end
end