From 0c908c4171f71afc6f364337a3aab738590c1e01 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 6 May 2016 15:46:51 +0200 Subject: [PATCH] Probable fix for an error --- Vect.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Vect.lua b/Vect.lua index 1f1fdef..2dd4714 100644 --- a/Vect.lua +++ b/Vect.lua @@ -279,7 +279,6 @@ function Vect:SortCDs(which) local db = Vect.db.profile; local tmp = {}; - --make the tmp table local i = 1; for k, v in pairs(self.cds[self.targets[which]]) do @@ -296,6 +295,8 @@ function Vect:SortCDs(which) i = i + 1; end + if not tmp then return end; + if db[which]["sortOrder"] == "1" then --["1"] = "Ascending (CD left)", table.sort(tmp, function(a, b) return Vect:ComparerAscendingCDLeft(a, b) end); elseif db[which]["sortOrder"] == "2" then --["2"] = "Descending (CD left)",