From 5843f631afb11da8812948b780eda9870fa3630d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Ritzl?= Date: Tue, 27 Apr 2021 19:52:14 +0200 Subject: [PATCH] Get the Lua context from the callback and not the listener --- extension-iap/src/iap_ios.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension-iap/src/iap_ios.mm b/extension-iap/src/iap_ios.mm index 0ec8bef..1d3099f 100644 --- a/extension-iap/src/iap_ios.mm +++ b/extension-iap/src/iap_ios.mm @@ -162,7 +162,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))