Skip to content

Commit c0f2bbc

Browse files
committed
fix crash when closing overlay
1 parent 79c4497 commit c0f2bbc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

android/src/main/java/flutter/overlay/window/flutter_overlay_window/OverlayService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ public void run() {
364364
mAnimationHandler.post(() -> {
365365
params.x = (2 * (params.x - mDestX)) / 3 + mDestX;
366366
params.y = (2 * (params.y - mDestY)) / 3 + mDestY;
367+
if(windowManager == null) return;
367368
windowManager.updateViewLayout(flutterView, params);
368369
if (Math.abs(params.x - mDestX) < 2 && Math.abs(params.y - mDestY) < 2) {
369370
TrayAnimationTimerTask.this.cancel();

0 commit comments

Comments
 (0)