Update wifi..c to fix #3106

This commit is contained in:
Terry Ellison 2020-05-15 12:45:54 +01:00 committed by Marcel Stör
parent 75f1c64cbc
commit 98e428f12e
1 changed files with 1 additions and 1 deletions

View File

@ -438,7 +438,7 @@ void wifi_pmSleep_suspend_CB(void)
{
lua_State* L = lua_getstate(); // Get main Lua thread pointer
lua_rawgeti(L, LUA_REGISTRYINDEX, wifi_suspend_cb_ref); // Push suspend callback onto stack
luaL_unref(L, wifi_suspend_cb_ref); // remove suspend callback from LUA_REGISTRY
luaL_unref(L, LUA_REGISTRYINDEX, wifi_suspend_cb_ref); // remove suspend callback from LUA_REGISTRY
wifi_suspend_cb_ref = LUA_NOREF; // Update variable since reference is no longer valid
lua_call(L, 0, 0); // Execute suspend callback
}