mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 12:33:43 +01:00
Fix possible nil crash
This commit is contained in:
parent
9dcccadfc2
commit
7a8b8d19df
4
init.lua
4
init.lua
@ -630,7 +630,7 @@ local function get_recipe_fs(data, fs)
|
|||||||
for j = 1, #replacements do
|
for j = 1, #replacements do
|
||||||
local replacement = replacements[j]
|
local replacement = replacements[j]
|
||||||
if replacement[1] == item then
|
if replacement[1] == item then
|
||||||
label = label .. "\nR"
|
label = "\nR"
|
||||||
replace = replacement[2]
|
replace = replacement[2]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -638,7 +638,7 @@ local function get_recipe_fs(data, fs)
|
|||||||
|
|
||||||
fs[#fs + 1] = fmt(FMT.item_image_button,
|
fs[#fs + 1] = fmt(FMT.item_image_button,
|
||||||
X, Y + (sfinv_only and 0.7 or 0),
|
X, Y + (sfinv_only and 0.7 or 0),
|
||||||
btn_size, btn_size, item, clean_name(item), ESC(label))
|
btn_size, btn_size, item, clean_name(item), ESC(label) or "")
|
||||||
|
|
||||||
local burntime = fuel_cache[item] and fuel_cache[item].burntime
|
local burntime = fuel_cache[item] and fuel_cache[item].burntime
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user