From bf30653fc2c0786d16d3424150ba968b3d6943a1 Mon Sep 17 00:00:00 2001 From: WantedDV <122710241+WantedDV@users.noreply.github.com> Date: Tue, 18 Apr 2023 09:30:52 -0230 Subject: [PATCH] Don't break if not CoD.LobbyMember --- data/ui_scripts/playlist/__init__.lua | 30 +++++++++++++-------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/data/ui_scripts/playlist/__init__.lua b/data/ui_scripts/playlist/__init__.lua index 80bdee19..f8080665 100644 --- a/data/ui_scripts/playlist/__init__.lua +++ b/data/ui_scripts/playlist/__init__.lua @@ -2,23 +2,21 @@ if Engine.GetCurrentMap() ~= "core_frontend" then return end -if not CoD.LobbyMember then - return -end - -local oldLobbyMember = CoD.LobbyMember.new -function CoD.LobbyMember.new(menu, controller) - local self = oldLobbyMember(menu, controller) - - -- Hide the playlist count text - if self.SearchingForPlayer then - self.SearchingForPlayer:setAlpha(0) +if CoD.LobbyMember then + local oldLobbyMember = CoD.LobbyMember.new + function CoD.LobbyMember.new(menu, controller) + local self = oldLobbyMember(menu, controller) + + -- Hide the playlist count text + if self.SearchingForPlayer then + self.SearchingForPlayer:setAlpha(0) + end + if self.FEMemberBlurPanelContainer0 then + self.FEMemberBlurPanelContainer0:setAlpha(0) + end + + return self end - if self.FEMemberBlurPanelContainer0 then - self.FEMemberBlurPanelContainer0:setAlpha(0) - end - - return self end function IsLobbyStatusVisible()