mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 21:43:34 +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);
|
luax_clearerror(T);
|
||||||
lovrSetErrorCallback(luax_vthrow, T);
|
lovrSetErrorCallback(luax_vthrow, T);
|
||||||
if (lua_resume(T, 1) != LUA_YIELD) {
|
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.renderCallback = NULL;
|
||||||
state.renderUserdata = NULL;
|
state.renderUserdata = NULL;
|
||||||
lua_close(L);
|
lua_close(L);
|
||||||
|
|
Loading…
Reference in a new issue