X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fscript%2Flua_api%2Fl_item.cpp;fp=src%2Fscript%2Flua_api%2Fl_item.cpp;h=27c1b887592c48cb02ebf11b5ddabc064c5d83cd;hb=a9a207685a9d55e4fcdd97f5065383e2ec18e114;hp=b58b994d95a78ea02f4df921e9b05397955c7751;hpb=c1d03695d4859ff4a531c31b6bddcd8f50384c41;p=dragonfireclient.git diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp index b58b994d9..27c1b8875 100644 --- a/src/script/lua_api/l_item.cpp +++ b/src/script/lua_api/l_item.cpp @@ -594,6 +594,9 @@ int ModApiItemMod::l_register_item_raw(lua_State *L) // be done if (f.name == "ignore") return 0; + // This would break everything + if (f.name.empty()) + throw LuaError("Cannot register node with empty name"); content_t id = ndef->set(f.name, f);