OSDN Git Service

Adding null check to outline generator
authorSunny Goyal <sunnygoyal@google.com>
Wed, 20 May 2015 00:35:07 +0000 (17:35 -0700)
committerSunny Goyal <sunnygoyal@google.com>
Wed, 20 May 2015 00:35:07 +0000 (17:35 -0700)
Change-Id: I8eb8b62a868d80fd0a7c9deec8915828bd8177d0

src/com/android/launcher3/HolographicOutlineHelper.java

index 4a04d03..5ff85d6 100644 (file)
@@ -157,6 +157,9 @@ public class HolographicOutlineHelper {
 
     Bitmap createMediumDropShadow(BubbleTextView view) {
         Drawable icon = view.getIcon();
+        if (icon == null) {
+            return null;
+        }
         Rect rect = icon.getBounds();
 
         int bitmapWidth = (int) (rect.width() * view.getScaleX());