From f3898a1663dc4fcb1937db8f6bfbe58433c9f7b2 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 9 Mar 2021 10:14:18 +0100 Subject: [PATCH] hopefully fixed database connection --- RaceTimer/scripting/unloze_racetimer_redux.sp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/RaceTimer/scripting/unloze_racetimer_redux.sp b/RaceTimer/scripting/unloze_racetimer_redux.sp index 5f3dad40..5e19d31e 100644 --- a/RaceTimer/scripting/unloze_racetimer_redux.sp +++ b/RaceTimer/scripting/unloze_racetimer_redux.sp @@ -151,13 +151,8 @@ public void SQL_FinishedQuery(Database db, DBResultSet results, const char[] err public void OnMapStart() { - Database.Connect(SQL_OnDatabaseConnect, "racetimercss"); -} - -public void OnMapEnd() -{ - if (g_dDatabase != null) - delete g_dDatabase; + if (!g_dDatabase) + Database.Connect(SQL_OnDatabaseConnect, "racetimercss"); } //----------------------------------------------------------------------------------------------------