mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-02 20:43:35 +00:00
Fix crash on lovr.event.quit("restart")
This commit is contained in:
parent
936766bd22
commit
334077c9f8
|
@ -511,7 +511,7 @@ void bridgeLovrUpdate(BridgeLovrUpdateData *updateData) {
|
|||
luax_clearerror(T);
|
||||
lovrSetErrorCallback(luax_vthrow, T);
|
||||
if (lua_resume(T, 1) != LUA_YIELD) {
|
||||
if (lua_type(T, -1) == LUA_TSTRING && !strcmp(lua_tostring(T, -1), "restart")) {
|
||||
if (lua_type(T, -2) == LUA_TSTRING && !strcmp(lua_tostring(T, -2), "restart")) {
|
||||
state.renderCallback = NULL;
|
||||
state.renderUserdata = NULL;
|
||||
lua_close(L);
|
||||
|
|
Loading…
Reference in a new issue