Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e5f3d2e authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix NPE in overridePlayingAppAnimations

It's not guaranteed that findMainWindow() is non-null, which can happen
if the window was just added, so we should not crash in that case.

Change-Id: I1f04876ef48bfc7636320124b7f60d6dfa0b24a2
Fixes: 31767124
parent 4e236046
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -846,6 +846,9 @@ class AppWindowToken extends WindowToken {
    void overridePlayingAppAnimations(Animation a) {
        if (mAppAnimator.isAnimating()) {
            final WindowState win = findMainWindow();
            if (win == null) {
                return;
            }
            final int width = win.mContainingFrame.width();
            final int height = win.mContainingFrame.height();
            mAppAnimator.setAnimation(a, width, height, false, STACK_CLIP_NONE);