summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2011-01-26 10:54:23 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2011-01-26 10:54:23 -0800
commitf5b27e35c1e0e46ffd882606d0783875e1a1ff7b (patch)
treee5eb5fafa1489e58c379e6755a9e2ff7f463b9ee
parent8b557459da3e1ac27d8aaa527be2eb795e61d926 (diff)
parentd30b36d3cdccc7854dedf5e3c020d2f4a8afa7b8 (diff)
Merge "Fix NPE in YouTube. Bug #3385339" into honeycomb
-rw-r--r--core/java/android/view/View.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 449091aa411f..aa911205877c 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4750,7 +4750,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
}
void performCollectViewAttributes(int visibility) {
- if ((visibility & VISIBILITY_MASK) == VISIBLE) {
+ if ((visibility & VISIBILITY_MASK) == VISIBLE && mAttachInfo != null) {
if ((mViewFlags & KEEP_SCREEN_ON) == KEEP_SCREEN_ON) {
mAttachInfo.mKeepScreenOn = true;
}