Fixed null deref when view parent null during invalidation

Change-Id: I4896b4af69f3a44351465e7524dd7b621050b415
This commit is contained in:
Chet Haase
2010-11-01 16:54:22 -07:00
parent e58a5ad04b
commit ea40e9abb0

View File

@@ -6298,7 +6298,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
}
final AttachInfo ai = mAttachInfo;
final ViewParent p = mParent;
if (ai != null && ai.mHardwareAccelerated) {
if (p != null && ai != null && ai.mHardwareAccelerated) {
// fast-track for GL-enabled applications; just invalidate the whole hierarchy
// with a null dirty rect, which tells the ViewRoot to redraw everything
p.invalidateChild(this, null);