From ddaeac82737455316b6697cc0322d604afc1d0e0 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 29 Jun 2017 11:55:39 +0200 Subject: [PATCH] Fix crash when using stairs near unknown nodes --- mods/ITEMS/mcstair/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/ITEMS/mcstair/init.lua b/mods/ITEMS/mcstair/init.lua index df6dd80987..f0411980cc 100644 --- a/mods/ITEMS/mcstair/init.lua +++ b/mods/ITEMS/mcstair/init.lua @@ -220,6 +220,9 @@ function mcstair.add(name, stairtiles) if not v.connect then local node = minetest.get_node(v.pos) local node_def = minetest.registered_nodes[node.name] + if not node_def then + return + end if node_def.stairs then t[i].stairs = node_def.stairs t[i].connect = stair_param_to_connect(get_stair_param(node), ceiling) @@ -369,6 +372,9 @@ function mcstair.add(name, stairtiles) if not v.connect then local node = minetest.get_node(v.pos) local node_def = minetest.registered_nodes[node.name] + if not node_def then + return + end if node_def.stairs then t[i].stairs = node_def.stairs t[i].connect = stair_param_to_connect(get_stair_param(node), ceiling)