From 6342f20d6968e1eedb39c38c7fc2f79e30843e9f Mon Sep 17 00:00:00 2001 From: Bobinzzzz Date: Fri, 10 Jul 2026 13:05:02 +0200 Subject: [PATCH] Fix callback state reset before execution --- core/client.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/client.lua b/core/client.lua index a6d4344..766de4b 100644 --- a/core/client.lua +++ b/core/client.lua @@ -45,9 +45,11 @@ RegisterNUICallback("minigame_result", function(data, cb) is_busy = false - if current_cb then - current_cb(data) - current_cb = nil + local callback = current_cb + current_cb = nil + + if callback then + callback(data) end cb("ok")