diff options
-rw-r--r-- | src/script/lua_api/l_nodemeta.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/lua_api/l_nodemeta.cpp b/src/script/lua_api/l_nodemeta.cpp index 514a1b78b..bdc4844c0 100644 --- a/src/script/lua_api/l_nodemeta.cpp +++ b/src/script/lua_api/l_nodemeta.cpp @@ -66,8 +66,10 @@ void NodeMetaRef::reportMetadataChange(const std::string *name) NodeMetadata *meta = dynamic_cast<NodeMetadata*>(getmeta(false)); // If the metadata is now empty, get rid of it - if (meta && meta->empty()) + if (meta && meta->empty()) { clearMeta(); + meta = nullptr; + } MapEditEvent event; event.type = MEET_BLOCK_NODE_METADATA_CHANGED; |