Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 803d91b2 authored by Tim Kilbourn's avatar Tim Kilbourn
Browse files

Fix NPE when inflating GradientDrawables.

Change-Id: If624d6efac61dabe6009ee4368ad7b119e1d4dcd
parent 0a8596dc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1009,7 +1009,7 @@ public class GradientDrawable extends Drawable {
            }

            if (state.mInnerRadius == -1
                    && themeAttrs == null || themeAttrs[R.styleable.GradientDrawable_thicknessRatio] == 0) {
                    && (themeAttrs == null || themeAttrs[R.styleable.GradientDrawable_thicknessRatio] == 0)) {
                state.mInnerRadiusRatio = a.getFloat(
                        R.styleable.GradientDrawable_innerRadiusRatio, DEFAULT_INNER_RADIUS_RATIO);
            }
@@ -1020,7 +1020,7 @@ public class GradientDrawable extends Drawable {
            }

            if (state.mThickness == -1
                    && themeAttrs == null || themeAttrs[R.styleable.GradientDrawable_thicknessRatio] == 0) {
                    && (themeAttrs == null || themeAttrs[R.styleable.GradientDrawable_thicknessRatio] == 0)) {
                state.mThicknessRatio = a.getFloat(
                        R.styleable.GradientDrawable_thicknessRatio, DEFAULT_THICKNESS_RATIO);
            }