# HG changeset patch # User Asa Ayers # Date 1279893382 25200 # Node ID 8afc1ac9bf5889ca75eb1aeb0a8f9ccac6feb59b # Parent 234896be40878f64f31a72d3aad763ee8675a010 Fixed bug 17 diff -r 234896be4087 -r 8afc1ac9bf58 Modules/Options.lua --- a/Modules/Options.lua Thu Jul 22 23:17:57 2010 -0700 +++ b/Modules/Options.lua Fri Jul 23 06:56:22 2010 -0700 @@ -50,7 +50,10 @@ function addon:GetSelectedChatWindow() if not selectedWindow then - selectedWindow = _G["ChatFrame"..self:GetChatWindowIndex()] + local index = self:GetChatWindowIndex() + if index then + selectedWindow = _G["ChatFrame"..index] + end end if (selectedWindow) then return selectedWindow