From 014fc5fa1851b301d07efef5712f35b942afd0e9 Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 30 Mar 2010 23:34:09 +0000 Subject: [PATCH] - added protection against giving a custom bar/cooldown/counter an empty name causing it to disappear from the options list --- modules/CustomBar.lua | 4 +++- modules/CustomCDBar.lua | 4 +++- modules/CustomCount.lua | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/CustomBar.lua b/modules/CustomBar.lua index d4b6362..9055d71 100644 --- a/modules/CustomBar.lua +++ b/modules/CustomBar.lua @@ -105,7 +105,9 @@ function IceCustomBar.prototype:GetOptions() return self.elementName end, set = function(v) - IceHUD.IceCore:RenameDynamicModule(self, v) + if v~= "" then + IceHUD.IceCore:RenameDynamicModule(self, v) + end end, disabled = function() return not self.moduleSettings.enabled diff --git a/modules/CustomCDBar.lua b/modules/CustomCDBar.lua index 0f4ed45..ce87352 100644 --- a/modules/CustomCDBar.lua +++ b/modules/CustomCDBar.lua @@ -96,7 +96,9 @@ function IceCustomCDBar.prototype:GetOptions() return self.elementName end, set = function(v) - IceHUD.IceCore:RenameDynamicModule(self, v) + if v ~= "" then + IceHUD.IceCore:RenameDynamicModule(self, v) + end end, disabled = function() return not self.moduleSettings.enabled diff --git a/modules/CustomCount.lua b/modules/CustomCount.lua index d7d1c97..5dca35c 100644 --- a/modules/CustomCount.lua +++ b/modules/CustomCount.lua @@ -47,7 +47,9 @@ function IceCustomCount.prototype:GetOptions() return self.elementName end, set = function(v) - IceHUD.IceCore:RenameDynamicModule(self, v) + if v ~= "" then + IceHUD.IceCore:RenameDynamicModule(self, v) + end end, disabled = function() return not self.moduleSettings.enabled