diff ProspectMe_Config.lua @ 17:4f5357900609

Fixed a bug in the database reset function
author Geoff Brock <mischivin@gmail.com>
date Sun, 04 Sep 2016 16:50:14 -0400
parents dabd5c6540ca
children 78a07841e004
line wrap: on
line diff
--- a/ProspectMe_Config.lua	Fri Aug 19 13:06:01 2016 -0400
+++ b/ProspectMe_Config.lua	Sun Sep 04 16:50:14 2016 -0400
@@ -56,11 +56,15 @@
 end
 
 local function ResetDatabase()
-	for i, v in pairs(PM_ResultsTable) do
-		ClearEntry(i)
+	if PM_ResultsTable then
+		for i, v in pairs(PM_ResultsTable) do
+			ClearEntry(i)
+		end
+		wipe(PM_ResultsTable)
 	end
-	wipe(PM_ResultsTable)
-	wipe(PM_SessionTable)
+	if PM_SessionTable then
+		wipe(PM_SessionTable)
+	end
 end
 
 local function UpdateConfig()