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"); } //----------------------------------------------------------------------------------------------------