From 46a225ad45717136d47f05e2bd54d826e0944aa9 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Wed, 26 Oct 2016 15:10:33 -0400 Subject: [PATCH] Minor nil Fix for Multiple Realms --- BagSync.lua | 10 +++++++--- BagSync.toc | 2 +- modules/search.lua | 8 ++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/BagSync.lua b/BagSync.lua index 858cc3e..5e5a750 100644 --- a/BagSync.lua +++ b/BagSync.lua @@ -1076,10 +1076,14 @@ function BSYC:AddItemToTooltip(frame, link) --workaround --check to make sure we didn't already add a guild from a connected-realm local trueRealmList = self.db.realmkey[0][v.realm] --get the connected realms - table.sort(trueRealmList, function(a,b) return (a < b) end) --sort them alphabetically - trueRealmList = table.concat(trueRealmList, "|") --concat them together + if trueRealmList then + table.sort(trueRealmList, function(a,b) return (a < b) end) --sort them alphabetically + trueRealmList = table.concat(trueRealmList, "|") --concat them together + else + trueRealmList = v.realm + end trueRealmList = guildN.."-"..trueRealmList --add the guild name in front of concat realm list - + if not previousGuilds[gName] and not previousGuildsXRList[trueRealmList] then --we only really need to see this information once per guild local tmpCount = 0 diff --git a/BagSync.toc b/BagSync.toc index a99b858..05fd243 100644 --- a/BagSync.toc +++ b/BagSync.toc @@ -2,7 +2,7 @@ ## Title: BagSync ## Notes: BagSync tracks your characters items and displays it within tooltips. ## Author: Xruptor -## Version: 10.6 +## Version: 10.7 ## OptionalDeps: tekDebug ## SavedVariables: BagSyncDB, BagSyncOpt, BagSyncGUILD_DB, BagSyncCURRENCY_DB, BagSyncPROFESSION_DB, BagSyncBLACKLIST_DB, BagSync_REALMKEY diff --git a/modules/search.lua b/modules/search.lua index 4d5294d..66b134c 100644 --- a/modules/search.lua +++ b/modules/search.lua @@ -212,8 +212,12 @@ function Search:DoSearch(searchStr) --check to make sure we didn't already add a guild from a connected-realm local trueRealmList = BSYC.db.realmkey[0][v.realm] --get the connected realms - table.sort(trueRealmList, function(a,b) return (a < b) end) --sort them alphabetically - trueRealmList = table.concat(trueRealmList, "|") --concat them together + if trueRealmList then + table.sort(trueRealmList, function(a,b) return (a < b) end) --sort them alphabetically + trueRealmList = table.concat(trueRealmList, "|") --concat them together + else + trueRealmList = v.realm + end trueRealmList = guildN.."-"..trueRealmList --add the guild name in front of concat realm list if not previousGuilds[gName] and not previousGuildsXRList[trueRealmList] then -- 1.7.9.5