Merge change 5142 into donut
* changes: Fix NPE in GradientDrawable constructor
This commit is contained in:
@@ -880,7 +880,9 @@ public class GradientDrawable extends Drawable {
|
|||||||
mShape = state.mShape;
|
mShape = state.mShape;
|
||||||
mGradient = state.mGradient;
|
mGradient = state.mGradient;
|
||||||
mOrientation = state.mOrientation;
|
mOrientation = state.mOrientation;
|
||||||
mColors = state.mColors.clone();
|
if (state.mColors != null) {
|
||||||
|
mColors = state.mColors.clone();
|
||||||
|
}
|
||||||
if (state.mPositions != null) {
|
if (state.mPositions != null) {
|
||||||
mPositions = state.mPositions.clone();
|
mPositions = state.mPositions.clone();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user