diff options
| author | Romain Guy <romainguy@google.com> | 2012-09-13 22:53:12 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-13 22:53:13 -0700 |
| commit | 51d71003e4211b273b8e00adf85389e91ea4bdff (patch) | |
| tree | 800174b3fcf554f6af0c6da80ce7f67c69b849a3 /core/java/android | |
| parent | cd6e7e1b5cc69065bcb08f834f0fca7d5ccc57fa (diff) | |
| parent | f84208faf8e9ab7bbf81224006662fc3219c6ad4 (diff) | |
Merge "Prevent crash when invalidating all Views Bug #7165793" into jb-mr1-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 47419bbd009c..d6a020329932 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -832,8 +832,8 @@ public final class ViewRootImpl implements ViewParent, void invalidateWorld(View view) { view.invalidate(); if (view instanceof ViewGroup) { - ViewGroup parent = (ViewGroup)view; - for (int i=0; i<parent.getChildCount(); i++) { + ViewGroup parent = (ViewGroup) view; + for (int i = 0; i < parent.getChildCount(); i++) { invalidateWorld(parent.getChildAt(i)); } } @@ -2998,7 +2998,9 @@ public final class ViewRootImpl implements ViewParent, handleDispatchDoneAnimating(); } break; case MSG_INVALIDATE_WORLD: { - invalidateWorld(mView); + if (mView != null) { + invalidateWorld(mView); + } } break; } } |
