mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Fixed epic bug in runtime.cpp causing non-Lua-owned objects to be released by Lua GC.
This commit is contained in:
@@ -37,9 +37,10 @@ namespace love
|
||||
**/
|
||||
static int w__gc(lua_State * L)
|
||||
{
|
||||
Proxy * u = (Proxy *)lua_touserdata(L, 1);
|
||||
Object * t = (Object *)u->data;
|
||||
t->release();
|
||||
Proxy * p = (Proxy *)lua_touserdata(L, 1);
|
||||
Object * t = (Object *)p->data;
|
||||
if(p->own)
|
||||
t->release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user