Make sure luax_getfile always returns a retained value

Before it would return a retained value if it returned a freshly constructed file, and an unretained value otherwise.
Also update all (3) call sites, to correctly retain or release as needed.
This commit is contained in:
Bart van Strien
2019-08-11 11:13:22 +02:00
parent 639bdb10e9
commit cb625d890a
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -47,6 +47,7 @@ int w_newVideoStream(lua_State *L)
luax_pushtype(L, stream);
stream->release();
file->release();
return 1;
}