Nexela / PickerExtended

MIT License
12 stars 16 forks source link

Mods changing .opened during the on_player_opened event can cause nil error #72

Closed OvermindDL1 closed 6 years ago

OvermindDL1 commented 6 years ago

Got this while playing:

@__PickerExtended__/stdlib/event/event.lua:160: __PickerExtended__/picker/filterfill.lua:217: attempt to call field 'get_output_inventory' (a nil value)

A lot of things were happening that were fairly unique at that exact moment, a force field emitter from the force field 2 mod was placed, a player was joining, massive amounts of inventory were being transferred by another into chests being placed...

OvermindDL1 commented 6 years ago

Further testing and I got it reliably happening. When I open the menu/inventory of the ForceField2's Force Field Projector then the error happens every time.

Nexela commented 6 years ago

Needs more sanatizing

if player.opened and player.opened.opened_gui_type == defines.gui_type.entity then