Merge pull request #38 from defold/issue-35-crash-on-iap-oncommand

Get the Lua context from the callback and not the listener
This commit is contained in:
Björn Ritzl
2021-04-28 10:06:24 +02:00
committed by GitHub

View File

@@ -169,7 +169,7 @@ static void HandleProductResult(IAPCommand* cmd)
IAPResponse* response = (IAPResponse*)cmd->m_Data;
lua_State* L = dmScript::GetCallbackLuaContext(g_IAP.m_Listener);
lua_State* L = dmScript::GetCallbackLuaContext(cmd->m_Callback);
int top = lua_gettop(L);
if (!dmScript::SetupCallback(cmd->m_Callback))