From d77c9ab5ff10e06bee8022176f9a47a5346c119b Mon Sep 17 00:00:00 2001 From: crabman77 Date: Sun, 28 Jun 2015 16:30:05 +0200 Subject: [PATCH] fixed crash when player leave during the join server --- mods/invtweak/init.lua | 3 +++ 1 file changed, 3 insertions(+) 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