diff --git a/webf/lib/src/bridge/binding.dart b/webf/lib/src/bridge/binding.dart index 265322513d..40e8a18686 100644 --- a/webf/lib/src/bridge/binding.dart +++ b/webf/lib/src/bridge/binding.dart @@ -49,7 +49,12 @@ void _dispatchEventToNative(Event event, bool isCapture) { Pointer? pointer = event.currentTarget?.pointer; int? contextId = event.target?.contextId; WebFController controller = WebFController.getControllerOfJSContextId(contextId)!; - if (contextId != null && pointer != null && pointer.ref.invokeBindingMethodFromDart != nullptr) { + if (contextId != null && + pointer != null && + pointer.ref.invokeBindingMethodFromDart != nullptr && + event.target?.pointer?.ref.disposed != true && + event.currentTarget?.pointer?.ref.disposed != true + ) { BindingObject bindingObject = controller.view.getBindingObject(pointer); // Call methods implements at C++ side. DartInvokeBindingMethodsFromDart f = pointer.ref.invokeBindingMethodFromDart.asFunction();