mt-mods / pipeworks

Pipeworks is a mod for Minetest allowing the crafting and usage of pipes and tubes
Other
14 stars 19 forks source link

crash due to missing nil-check #124

Closed SwissalpS closed 4 months ago

SwissalpS commented 5 months ago
2024-04-19 20:27:42: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback on_playerReceiveFields(): /data/world//worldmods/pipeworks/compat-chests.lua:52: attempt to index a nil value
2024-04-19 20:27:42: ERROR[Main]: stack traceback:
2024-04-19 20:27:42: ERROR[Main]:   /data/world//worldmods/pipeworks/compat-chests.lua:52: in function 'fn'
2024-04-19 20:27:42: ERROR[Main]:   .../world//worldmods/monitoring/builtin/received_fields.lua:22: in function <.../world//worldmods/monitoring/builtin/received_fields.lua:20>
2024-04-19 20:27:42: ERROR[Main]:   /usr/local/share/minetest/builtin/common/register.lua:26: in function </usr/local/share/minetest/builtin/common/register.lua:12>

https://github.com/mt-mods/pipeworks/blob/1169cff163f9b0131c41a11d146d111ff065b476/compat-chests.lua#L51-L52

possibly player logged off. Fakeplayer usually has a name, so probably not that.