Fix race condition in SharedTable (#113)
This commit is contained in:
parent
2e4e219b85
commit
26de78b084
@ -280,7 +280,8 @@ SharedTable SharedTable::luaSetMetatable(const sol::stack_object& tbl, const sol
|
|||||||
stable.ctx_->metatable = GCNull;
|
stable.ctx_->metatable = GCNull;
|
||||||
}
|
}
|
||||||
|
|
||||||
stable.ctx_->metatable = createStoredObject(mt)->gcHandle();
|
const auto mtObj = createStoredObject(mt);
|
||||||
|
stable.ctx_->metatable = mtObj->gcHandle();
|
||||||
stable.ctx_->addReference(stable.ctx_->metatable);
|
stable.ctx_->addReference(stable.ctx_->metatable);
|
||||||
|
|
||||||
return stable;
|
return stable;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user