changeset 9:4fba9c6b5d3d

Sanity check on history realm list dropdown.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Fri, 17 Jun 2011 20:30:46 +0000
parents 30ba1f35e164
children 67b8537e8432
files gui.lua
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui.lua	Fri Jun 17 00:13:35 2011 +0000
+++ b/gui.lua	Fri Jun 17 20:30:46 2011 +0000
@@ -1149,8 +1149,10 @@
 			do
 				local realms,current = {},1
 				for realmname,histtable in pairs(addon.history_all) do
-					tinsert(realms,realmname)
-					if addon.history == histtable then current = #realms end
+					if type(histtable) == 'table' then
+						tinsert(realms,realmname)
+						if addon.history == histtable then current = #realms end
+					end
 				end
 				b = mkbutton("Dropdown", nil, "", [[Which realm to display]])
 				b:SetFullWidth(true)