From 76f9cda458b0f5b237bf6205848c811da4cb8be7 Mon Sep 17 00:00:00 2001 From: Sebastian Franco Date: Thu, 30 Dec 2021 11:51:37 -0600 Subject: [PATCH] Quick fix for NullPointerException 211713013 Test: Manually tested Fix: 211713013 Change-Id: Ie701bee61a69d88cc9fce12c9d001a52f30578c4 --- .../systemui/shared/system/RemoteAnimationTargetCompat.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java index 30db13611f4a7..2583e096e3c7e 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RemoteAnimationTargetCompat.java @@ -278,7 +278,9 @@ public class RemoteAnimationTargetCompat { * @see SurfaceControl#release() */ public void release() { - leash.mSurfaceControl.release(); + if (leash.mSurfaceControl != null) { + leash.mSurfaceControl.release(); + } if (mStartLeash != null) { mStartLeash.release(); }