mirror of
https://github.com/status-im/react-native-linear-gradient.git
synced 2025-02-01 10:24:50 +00:00
Fix partial update related crashes
This commit is contained in:
parent
868edfc050
commit
3ec15207ee
@ -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],
|
||||
|
Loading…
x
Reference in New Issue
Block a user