From 6c6e1d453d82d40f6ebe1f95a85ad29ce40b21d4 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 26 Jul 2022 21:43:40 +0200 Subject: [PATCH] Fix crash in non-MTG games --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2920011..1f287fc 100644 --- a/init.lua +++ b/init.lua @@ -464,7 +464,9 @@ minetest.register_node( "pride_flags:upper_mast", { end local def = minetest.registered_nodes["pride_flags:upper_mast"] - minetest.sound_play(def.sounds.place, {pos = pos}, true) + if def and def.sounds then + minetest.sound_play(def.sounds.place, {pos = pos}, true) + end return itemstack end,