mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-07-04 15:40:30 +02:00
fix potential crash
This commit is contained in:
@ -237,8 +237,8 @@ local sandstone_tex = "default_sandstone.png"
|
|||||||
if not minetest.get_modpath("default") then
|
if not minetest.get_modpath("default") then
|
||||||
local sname = minetest.registered_nodes["mapgen_stone"].name
|
local sname = minetest.registered_nodes["mapgen_stone"].name
|
||||||
local names = sname:split(":")
|
local names = sname:split(":")
|
||||||
local nitem = string.gsub(names[2], "stone", "sandstone")
|
local nitem = names[2] and string.gsub(names[2], "stone", "sandstone") or nil
|
||||||
if minetest.registered_nodes[names[1]..":"..nitem] then
|
if nitem and minetest.registered_nodes[names[1]..":"..nitem] then
|
||||||
sandstone_tex = minetest.registered_nodes[names[1]..":"..nitem].tiles[1]
|
sandstone_tex = minetest.registered_nodes[names[1]..":"..nitem].tiles[1]
|
||||||
else
|
else
|
||||||
sandstone_tex = "[combine:16x16^[noalpha^[colorize:#fefebe"
|
sandstone_tex = "[combine:16x16^[noalpha^[colorize:#fefebe"
|
||||||
|
Reference in New Issue
Block a user