diff --git a/mods/invtweak/init.lua b/mods/invtweak/init.lua index eee96d63..30b3fd1c 100755 --- a/mods/invtweak/init.lua +++ b/mods/invtweak/init.lua @@ -35,6 +35,9 @@ local function add_buttons(player, formspec) formspec = player:get_inventory_formspec() end local w,h = get_formspec_size(formspec) + if not w or not h then + return + end for i=1,#tweak.buttons do formspec = formspec .. "button["..w-(0.8+(i*0.8))..",0.2;" .. tweak.buttons[i] end