Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
FIX: ScriptInvocationManager data race
Browse files Browse the repository at this point in the history
  • Loading branch information
koying committed Dec 22, 2016
1 parent cc3027a commit ca693de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xbmc/interfaces/generic/ScriptInvocationManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,12 @@ int CScriptInvocationManager::ExecuteAsync(const std::string &script, LanguageIn

CSingleLock lock(m_critSection);
invokerThread->SetId(m_nextId++);
lock.Leave();

LanguageInvokerThread thread = { invokerThread, script, false };
m_scripts.insert(std::make_pair(invokerThread->GetId(), thread));
m_scriptPaths.insert(std::make_pair(script, invokerThread->GetId()));
lock.Leave();

invokerThread->Execute(script, arguments);

return invokerThread->GetId();
Expand Down

0 comments on commit ca693de

Please sign in to comment.