OSDN Git Service

Check for null display list
authorAlan Viverette <alanv@google.com>
Tue, 4 Feb 2014 22:19:06 +0000 (14:19 -0800)
committerAlan Viverette <alanv@google.com>
Tue, 4 Feb 2014 22:19:06 +0000 (14:19 -0800)
BUG: 12764584
Change-Id: I071aa0d9bc4f4ac353a5d0f534cf7c44964d4bf0

core/java/android/view/View.java

index 12dc044..4b6f2b0 100644 (file)
@@ -14941,7 +14941,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
         if (mBackgroundSizeChanged) {
             // We should see the background invalidate itself, but just to be
             // careful we're going to clear the display list and force redraw.
-            mBackgroundDisplayList.clear();
+            if (mBackgroundDisplayList != null) {
+                mBackgroundDisplayList.clear();
+            }
+
             background.setBounds(0, 0,  mRight - mLeft, mBottom - mTop);
             mBackgroundSizeChanged = false;
         }