Skip to content

Commit

Permalink
trying to fix crash
Browse files Browse the repository at this point in the history
Try to fix server crash
  • Loading branch information
AndrejIT committed Aug 23, 2014
1 parent 517a8fc commit ce5706c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion craft_guide/api_craft_guide.lua
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ craft_guide.update_recipe = function(meta, player, stack, alternate)
craft_guide.set_stack(inv, "fuel", 1, nil)

if stack==nil then return end
if stack:get_name()=="" then
craft_guide.log("Request for item with empty name :|")
return
end
craft_guide.set_stack(inv, "output", 1, stack:get_name())

alternate = tonumber(alternate) or 1
Expand All @@ -243,7 +247,7 @@ craft_guide.update_recipe = function(meta, player, stack, alternate)
local craft = crafts[alternate]

-- show me the unknown items
craft_guide.log(dump(craft))
-- craft_guide.log(dump(craft))
--minetest.chat_send_player(player:get_player_name(), "recipe for "..stack:get_name()..": "..dump(craft))

local itemstack = ItemStack(craft.output)
Expand Down

0 comments on commit ce5706c

Please sign in to comment.