From 6a7a513c88b10bff97404869fbe53cc075446f3b Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 29 Sep 2018 01:09:29 +0200 Subject: [PATCH] core: make sure to avoid loading modules twice --- pfUI.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pfUI.lua b/pfUI.lua index 44f659b1..4628ec60 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -166,6 +166,7 @@ function pfUI:GetEnvironment() end function pfUI:RegisterModule(n, f) + if pfUI.module[n] then return end pfUI.module[n] = f table.insert(pfUI.modules, n) if not pfUI.bootup then @@ -174,6 +175,7 @@ function pfUI:RegisterModule(n, f) end function pfUI:RegisterSkin(n, f) + if pfUI.skin[n] then return end pfUI.skin[n] = f table.insert(pfUI.skins, n) if not pfUI.bootup then