From d63441e5fd74f7eb712b48d09cf68d01475d6891 Mon Sep 17 00:00:00 2001 From: Aleksei-bird Date: Tue, 25 Jun 2024 22:03:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BB=D0=B8=D1=88=D0=BD=D0=B5=D0=B3=D0=BE=20=D0=BE?= =?UTF-8?q?=D0=BA=D0=BD=D0=B0=20GUI=20Unifier=20(#76)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zzzparanoidal/control.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zzzparanoidal/control.lua b/zzzparanoidal/control.lua index 1cab08f3..c87b70bf 100644 --- a/zzzparanoidal/control.lua +++ b/zzzparanoidal/control.lua @@ -126,9 +126,9 @@ script.on_event(defines.events.on_built_entity, function(event) myVariable = myVariable + 1 if myVariable <= 5 then for _, player in pairs(game.players) do - if player.gui.top.mod_gui_top_frame.children[1].random then - player.gui.top.mod_gui_top_frame.children[1].random.destroy() - end - end + if player.gui.top.mod_gui_top_frame and player.gui.top.mod_gui_top_frame.children[1] and player.gui.top.mod_gui_top_frame.children[1].random then + player.gui.top.mod_gui_top_frame.children[1].random.destroy() + end + end end end) \ No newline at end of file