projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d45b27
)
Screwdriver: Fix crash
author
tenplus1
<tenplus1@users.noreply.github.com>
Wed, 1 Mar 2017 16:57:27 +0000
(16:57 +0000)
committer
paramat
<mat.gregory@virginmedia.com>
Tue, 7 Mar 2017 06:37:33 +0000
(06:37 +0000)
If 'node_box' is nil 'node_box.type' causes a crash.
mods/screwdriver/init.lua
patch
|
blob
|
history
diff --git
a/mods/screwdriver/init.lua
b/mods/screwdriver/init.lua
index d898cb9f038608f4ddac7a70599d4d302d324a39..383d29cd175206f4ad9aedcbc73e55def458744d 100644
(file)
--- 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