OSDN Git Service

Avoid an NPE while checking view location on screen.
authorAga Madurska <amad@google.com>
Fri, 12 Aug 2016 09:17:49 +0000 (10:17 +0100)
committerAga Madurska <amad@google.com>
Fri, 12 Aug 2016 17:00:25 +0000 (18:00 +0100)
Bug:30483148

Change-Id: I115da4fefff5fecc04135e2b150e1e77445cb86e

core/java/android/view/View.java

index fc250f2..163f855 100644 (file)
@@ -23859,7 +23859,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
      * on the screen.
      */
     private boolean shouldDrawRoundScrollbar() {
-        if (!mResources.getConfiguration().isScreenRound()) {
+        if (!mResources.getConfiguration().isScreenRound() || mAttachInfo == null) {
             return false;
         }