Quantcast

* Fix to the SV conversion, if sv.global doesn't exist

James Whitehead II [04-14-07 - 01:22]
* Fix to the SV conversion, if sv.global doesn't exist
Filename
PerfectRaid.lua
diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index 2bebc85..10de551 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -57,8 +57,11 @@ function PerfectRaid:Initialize()
 	utils = self.utils

 	-- This is a small procedure to update the saved variables
+	PerfectRaidDB = PerfectRaidDB or {}
 	local sv = PerfectRaidDB

+	if not sv.global then sv.global = {} end
+
 	if sv and not sv.global.sv_converted then
 		if sv.char then
 			local converted = {}
@@ -89,7 +92,6 @@ function PerfectRaid:Initialize()
 			sv.profileKeys = converted
 		end

-		if not sv.global then sv.global = {} end
 		sv.global.sv_converted = true
 	end
 end