Prevent NPE when a View is detached without having been attached.
Bug #3355252 Change-Id: I58e03983ccf6a27a24619ec0f49659d6d7cc0a64
This commit is contained in:
@@ -7580,8 +7580,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
|
||||
mHardwareLayer.destroy();
|
||||
mHardwareLayer = null;
|
||||
}
|
||||
mAttachInfo.mHandler.removeMessages(AttachInfo.INVALIDATE_MSG, this);
|
||||
mAttachInfo.mHandler.removeMessages(AttachInfo.INVALIDATE_RECT_MSG, this);
|
||||
|
||||
if (mAttachInfo != null) {
|
||||
mAttachInfo.mHandler.removeMessages(AttachInfo.INVALIDATE_MSG, this);
|
||||
mAttachInfo.mHandler.removeMessages(AttachInfo.INVALIDATE_RECT_MSG, this);
|
||||
}
|
||||
|
||||
mCurrentAnimation = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user