From 0c3c6ab9641e76717143e6b17b68070d78450864 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 29 Jul 2020 17:01:04 -0700 Subject: [PATCH] Add missing MouseCursorPlugin destroy call (flutter/engine#19968) --- .../android/io/flutter/embedding/android/FlutterView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterView.java b/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterView.java index 8cf69c24cf..4a1517f9f3 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterView.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/embedding/android/FlutterView.java @@ -936,6 +936,10 @@ public class FlutterView extends FrameLayout implements MouseCursorPlugin.MouseC textInputPlugin.getInputMethodManager().restartInput(this); textInputPlugin.destroy(); + if (mouseCursorPlugin != null) { + mouseCursorPlugin.destroy(); + } + // Instruct our FlutterRenderer that we are no longer interested in being its RenderSurface. FlutterRenderer flutterRenderer = flutterEngine.getRenderer(); isFlutterUiDisplayed = false;