mirror of
https://github.com/status-im/react-native-linear-gradient.git
synced 2025-02-21 20:08:11 +00:00
Merge pull request #55 from technicallyfeasible/master
Fix partial update related crashes
This commit is contained in:
commit
45df07fa0b
@ -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