From ffb2f987aade776a2ffad0287a1c18e4227dee40 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Sat, 7 Jun 2025 00:47:15 +0900 Subject: [PATCH] . --- PHI-CL/control.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index 20dbda2..8e21660 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -224,7 +224,11 @@ if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (sett end) script.on_event(defines.events.on_gui_opened, function(event) - if event.entity and (event.entity.type == 'inserter' or (event.entity.type == 'entity-ghost' and event.entity.ghost_type == 'inserter')) then + if not event.entity then + return + end + + if event.entity.type == 'inserter' or (event.entity.type == 'entity-ghost' and event.entity.ghost_type == 'inserter') then inserter_gui_update(game.players[event.player_index], event.entity) end end)