From dcb3d754bace91f54d6f0d95ed9bec6ccfe8b357 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 2 Oct 2020 12:07:09 +0200 Subject: [PATCH] gui: check update function tables before using it --- modules/gui.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gui.lua b/modules/gui.lua index 3fbf532c..7e9c797a 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -18,9 +18,9 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () U = setmetatable({}, { __index = function(tab,key) 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 - 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 end if ufunc then