diff --git a/src/engine/server/sql_server.cpp b/src/engine/server/sql_server.cpp index ee29493c9..062f4162a 100644 --- a/src/engine/server/sql_server.cpp +++ b/src/engine/server/sql_server.cpp @@ -21,7 +21,7 @@ CSqlServer::CSqlServer(const char* pDatabase, const char* pPrefix, const char* p m_pConnection = 0; m_pResults = 0; m_pStatement = 0; - + m_SqlLock = lock_create(); } diff --git a/src/game/server/score/sql_score.cpp b/src/game/server/score/sql_score.cpp index e14353c15..84de39575 100644 --- a/src/game/server/score/sql_score.cpp +++ b/src/game/server/score/sql_score.cpp @@ -32,7 +32,8 @@ m_pServer(pGameServer->Server()) CSqlData::ms_pPlayerData = PlayerData(0); CSqlData::ms_pMap = m_aMap; - ExecSqlFunc(new CSqlExecData(Init, new CSqlData())); + void* InitThread = thread_init(ExecSqlFunc, new CSqlExecData(Init, new CSqlData())); + thread_detach(InitThread); } void CSqlScore::ExecSqlFunc(void *pUser)