mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Squirrel: fix lambda capture for scheduled execute task
Running command as FCVAR_GAMEDLL caused unpredictable behavior.
This commit is contained in:
parent
2887e79bcb
commit
04d4c64107
@ -246,9 +246,9 @@ void Script_Execute(const SQChar* code, SQCONTEXT context)
|
||||
{
|
||||
if (!ThreadInMainThread())
|
||||
{
|
||||
g_TaskScheduler->Dispatch([code, context]()
|
||||
const string scode(code);
|
||||
g_TaskScheduler->Dispatch([scode, context]()
|
||||
{
|
||||
string scode(code);
|
||||
Script_Execute(scode.c_str(), context);
|
||||
}, 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user