From 9b49bc005a8462e134e56b210d118c3f254ad42a Mon Sep 17 00:00:00 2001 From: urnati Date: Mon, 22 Mar 2021 17:35:42 -0400 Subject: [PATCH] - Tickets #1300 and #1301 : Prevent an error causing Titan to not successfully initialize. This only prevents the error, it may help uncover the real issue. --- Titan/TitanUtils.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Titan/TitanUtils.lua b/Titan/TitanUtils.lua index 84af0d3..24b9633 100644 --- a/Titan/TitanUtils.lua +++ b/Titan/TitanUtils.lua @@ -1686,7 +1686,13 @@ OUT: - true (IsVisible) or false --]] function TitanPanelRightClickMenu_IsVisible() - return _G[drop_down_1]:IsVisible(); + local res = false + if _G[drop_down_1] and _G[drop_down_1]:IsVisible() then + res = true + else + res = false + end + return res end --[[ Titan @@ -1696,7 +1702,7 @@ VAR: None OUT: None --]] function TitanPanelRightClickMenu_Close() - if _G[drop_down_1]:IsVisible() then + if _G[drop_down_1] and _G[drop_down_1]:IsVisible() then _G[drop_down_1]:Hide() end end -- 1.7.9.5