mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
Fixed a potential memory leak
This commit is contained in:
@@ -193,7 +193,10 @@ int w_getIcon(lua_State *L)
|
||||
{
|
||||
image::ImageData *i = instance->getIcon();
|
||||
if (i)
|
||||
{
|
||||
i->retain();
|
||||
luax_newtype(L, "ImageData", IMAGE_IMAGE_DATA_T, (void*) i);
|
||||
}
|
||||
else
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user