From 91a808a0ff96831c467f17cb516ac64cbe14f213 Mon Sep 17 00:00:00 2001 From: sammzeng Date: Thu, 28 Dec 2023 15:02:15 +0800 Subject: [PATCH] =?UTF-8?q?DelegateProxy=E5=88=A4=E6=96=ADIsValid()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp b/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp index fa2fa652af..576b06b113 100644 --- a/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp +++ b/unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp @@ -2540,7 +2540,7 @@ bool FJsEnvImpl::RemoveFromDelegate( __USE(RemoveListItem.Get(Isolate)->Call(Context, v8::Undefined(Isolate), 2, Args)); - if (JsCallbacks->Length() == 0) + if (JsCallbacks->Length() == 0 && Iter->second.Proxy.IsValid()) { auto DelegateProxy = Iter->second.Proxy.Get();