mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-21 20:00:48 +00:00
gui: check update function tables before using it
This commit is contained in:
+2
-2
@@ -18,9 +18,9 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
|||||||
|
|
||||||
U = setmetatable({}, { __index = function(tab,key)
|
U = setmetatable({}, { __index = function(tab,key)
|
||||||
local ufunc
|
local ufunc
|
||||||
if pfUI[key] and pfUI[key].UpdateConfig then
|
if type(pfUI[key]) == "table" and pfUI[key].UpdateConfig then
|
||||||
ufunc = function() return pfUI[key]:UpdateConfig() end
|
ufunc = function() return pfUI[key]:UpdateConfig() end
|
||||||
elseif pfUI.uf and pfUI.uf[key] and pfUI.uf[key].UpdateConfig then
|
elseif pfUI.uf and type(pfUI.uf[key]) == "table" and pfUI.uf[key].UpdateConfig then
|
||||||
ufunc = function() return pfUI.uf[key]:UpdateConfig() end
|
ufunc = function() return pfUI.uf[key]:UpdateConfig() end
|
||||||
end
|
end
|
||||||
if ufunc then
|
if ufunc then
|
||||||
|
|||||||
Reference in New Issue
Block a user