mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-02-21 19:20:07 +02:00
Fix crash with nil item stack (#1458)
This commit is contained in:
parent
f1223c0720
commit
3a6e48e7c4
@ -213,8 +213,15 @@ local on_built_token =
|
||||
end
|
||||
|
||||
local index = event.player_index
|
||||
local stack = event.consumed_items.get_contents()[1]
|
||||
if not stack then
|
||||
if index then
|
||||
return
|
||||
else
|
||||
stack = {}
|
||||
end
|
||||
end
|
||||
|
||||
local stack = event.consumed_items.get_contents()[1] -- TODO: proper handle of consumed_items as LuaInventory
|
||||
raise_event(
|
||||
Public.events.on_pre_restricted_entity_destroyed,
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user