mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Prevent race condition in thread:receive (bug #131)
This commit is contained in:
@@ -253,6 +253,8 @@ namespace sdl
|
||||
{
|
||||
lock();
|
||||
ThreadVariant *v = comm->getValue(name);
|
||||
if (v)
|
||||
v->retain();
|
||||
unlock();
|
||||
return v;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,6 @@ namespace sdl
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
v->retain();
|
||||
t->clear(name);
|
||||
switch(v->type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user