From: tenplus1 Date: Wed, 1 Mar 2017 16:57:27 +0000 (+0000) Subject: Screwdriver: Fix crash X-Git-Tag: 0.4.16~74 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6d67badcacded366db681b5dfecf7a3ae07bc408;p=oweals%2Fminetest_game.git Screwdriver: Fix crash If 'node_box' is nil 'node_box.type' causes a crash. --- diff --git a/mods/screwdriver/init.lua b/mods/screwdriver/init.lua index d898cb9f..383d29cd 100644 --- a/mods/screwdriver/init.lua +++ b/mods/screwdriver/init.lua @@ -67,7 +67,7 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses) if not ndef or not ndef.paramtype2 == "facedir" or ndef.on_rotate == false or (ndef.drawtype == "nodebox" and - not ndef.node_box.type == "fixed") or + (ndef.node_box and ndef.node_box.type ~= "fixed")) or node.param2 == nil then return end