Merge pull request #55 from technicallyfeasible/master

Fix partial update related crashes
This commit is contained in:
Dmitry Gladkov 2016-01-25 20:06:38 +02:00
commit 45df07fa0b

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],