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

Commit 8dd5b1e5 authored by Romain Guy's avatar Romain Guy
Browse files

Prevent NPE when a View is detached without having been attached.

Bug #3355252

Change-Id: I58e03983ccf6a27a24619ec0f49659d6d7cc0a64
parent c8276990
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -7580,8 +7580,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
            mHardwareLayer.destroy();
            mHardwareLayer = null;
        }

        if (mAttachInfo != null) {
            mAttachInfo.mHandler.removeMessages(AttachInfo.INVALIDATE_MSG, this);
            mAttachInfo.mHandler.removeMessages(AttachInfo.INVALIDATE_RECT_MSG, this);
        }

        mCurrentAnimation = null;
    }