mirror of
https://github.com/status-im/react-native-linear-gradient.git
synced 2026-08-31 06:11:18 +00:00
Merge pull request #55 from technicallyfeasible/master
Fix partial update related crashes
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user