Fix partial update related crashes

This commit is contained in:
Jens 2016-01-25 12:27:46 +01:00
parent 868edfc050
commit 3ec15207ee

View File

@ -60,6 +60,9 @@ public class LinearGradientView extends View {
}
private void drawGradient() {
// guard against crashes happening while multiple properties are updated
if (mColors == null || (mLocations != null && mColors.length != mLocations.length))
return;
mShader = new LinearGradient(
mStartPos[0] * mSize[0],
mStartPos[1] * mSize[1],