From 63952f13f79b8f00d9fc5c84f06a11db0739d3a2 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Tue, 11 Nov 2008 16:41:32 +0100 Subject: [PATCH] Added safeguard against GetCurrentBindingSet() returning nil in rare cases during login --- ActionBars.lua | 2 +- Options/Options.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ActionBars.lua b/ActionBars.lua index a4c86bd..f72696c 100644 --- a/ActionBars.lua +++ b/ActionBars.lua @@ -182,7 +182,7 @@ function BT4ActionBars:ReassignBindings() end end end - SaveBindings(GetCurrentBindingSet()) + SaveBindings(GetCurrentBindingSet() or 1) end -- Creates a new bar object based on the id and the specified config diff --git a/Options/Options.lua b/Options/Options.lua index 646d876..0bfc9db 100644 --- a/Options/Options.lua +++ b/Options/Options.lua @@ -84,7 +84,7 @@ local function getOptions() name = L["Self-Cast Modifier"], desc = L["Select the Self-Cast Modifier"], get = function(info) return GetModifiedClick("SELFCAST") end, - set = function(info, value) SetModifiedClick("SELFCAST", value); SaveBindings(GetCurrentBindingSet()) end, + set = function(info, value) SetModifiedClick("SELFCAST", value); SaveBindings(GetCurrentBindingSet() or 1) end, values = { NONE = L["None"], ALT = L["ALT"], SHIFT = L["SHIFT"], CTRL = L["CTRL"] }, }, selfcast_nl = { @@ -109,7 +109,7 @@ local function getOptions() name = L["Focus-Cast Modifier"], desc = L["Select the Focus-Cast Modifier"], get = function(info) return GetModifiedClick("FOCUSCAST") end, - set = function(info, value) SetModifiedClick("FOCUSCAST", value); SaveBindings(GetCurrentBindingSet()) end, + set = function(info, value) SetModifiedClick("FOCUSCAST", value); SaveBindings(GetCurrentBindingSet() or 1) end, values = { NONE = L["None"], ALT = L["ALT"], SHIFT = L["SHIFT"], CTRL = L["CTRL"] }, }, focuscast_nl = {