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;