Don't dispatchDetachedFromWindow() if the View was not attached.

Change-Id: I36cb697be76c8c03497284563dc339c5367559c6
This commit is contained in:
Romain Guy
2011-01-16 13:07:15 -08:00
parent f219da5e32
commit 90fc03bc49

View File

@@ -1780,7 +1780,7 @@ public final class ViewRoot extends Handler implements ViewParent,
}
void dispatchDetachedFromWindow() {
if (mView != null) {
if (mView != null && mView.mAttachInfo != null) {
mView.dispatchDetachedFromWindow();
}