From 6bca4ffdff38c0ba68a00529aa0ba57889aba105 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 25 Dec 2020 19:11:16 +0000 Subject: [PATCH] added missing nil check --- init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index beef2db..fdebd2c 100644 --- a/init.lua +++ b/init.lua @@ -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