From 977dcc6a93de996d95cfd110109d770e8fcb9daa Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sun, 18 Aug 2024 20:33:57 +0100 Subject: [PATCH] pos_marker_manage: add some checks to update_entity event listener For #105 because I can't reproduce the issue. --- worldeditadditions_core/core/pos_marker_manage.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/worldeditadditions_core/core/pos_marker_manage.lua b/worldeditadditions_core/core/pos_marker_manage.lua index 8668eca..2811439 100644 --- a/worldeditadditions_core/core/pos_marker_manage.lua +++ b/worldeditadditions_core/core/pos_marker_manage.lua @@ -114,6 +114,12 @@ end) wea_c.entities.pos_marker:addEventListener("update_entity", function(event) + ensure_player(event.player_name) + + if position_entities[event.player_name][event.i] == nil then + minetest.log("warning", "[wea core:pos_manage:EL/update_entity] position_entities".."["..tostring(event.player_name).."]["..tostring(event.i).."] doesnt exist, event object "..wea.inspect(event).."\nPlease check WEA is up to date and then report this in https://github.com/sbrl/Minetest-WorldEditAdditions/issues/105.") + end + wea_c.entities.pos_marker.delete( position_entities[event.player_name][event.i] )