From 5cc6fe2807019b4b8006c9366daee21619101be9 Mon Sep 17 00:00:00 2001 From: y Date: Sun, 26 May 2019 19:13:14 +0100 Subject: [PATCH] resolve #3 --- inspect.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inspect.lua b/inspect.lua index 6c038a3..d2ecafc 100644 --- a/inspect.lua +++ b/inspect.lua @@ -76,14 +76,14 @@ replacer.inspect = function( itemstack, user, pointed_thing, mode, show_receipe local sdata = luaob:get_staticdata(); if( sdata ) then sdata = minetest.deserialize( sdata ); - if( sdata.itemstring ) then + if( sdata and sdata.itemstring ) then text = text..' ['..tostring( sdata.itemstring )..']'; if( show_receipe ) then -- the fields part is used here to provide additional information about the entity replacer.inspect_show_crafting( name, sdata.itemstring, { pos=pos, luaob=luaob} ); end end - if( sdata.age ) then + if( sdata and sdata.age ) then text = text..', dropped '..tostring( math.floor( sdata.age/60 ))..' minutes ago'; end end