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:
49a8ddc
)
Fix farming unloaded node crash
author
ShadowNinja
<shadowninja@minetest.net>
Sun, 7 Sep 2014 00:34:52 +0000
(20:34 -0400)
committer
ShadowNinja
<shadowninja@minetest.net>
Sun, 7 Sep 2014 00:36:40 +0000
(20:36 -0400)
mods/farming/api.lua
patch
|
blob
|
history
diff --git
a/mods/farming/api.lua
b/mods/farming/api.lua
index e6d57f803fe0727bbe49642b63489c770669819c..6ce996d8138f86c14ee63bd1483ce413663f6248 100644
(file)
--- a/
mods/farming/api.lua
+++ b/
mods/farming/api.lua
@@
-241,6
+241,9
@@
farming.register_plant = function(name, def)
if minetest.get_item_group(node.name, "seed") and node_def.fertility then
local can_grow = false
local soil_node = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z})
+ if not soil_node then
+ return
+ end
for _, v in pairs(node_def.fertility) do
if minetest.get_item_group(soil_node.name, v) ~= 0 then
can_grow = true