Android: ensure start & end are not null
This commit is contained in:
parent
d060e1427c
commit
c2264e621c
@ -243,11 +243,13 @@ public abstract class ViewNode<T extends View> extends DoricContextHolder {
|
||||
|
||||
gradientDrawable.setColors(colors.asArray().toIntArray());
|
||||
} else {
|
||||
if (prop.asObject().propertySet().contains("start") && prop.asObject().propertySet().contains("end")) {
|
||||
JSValue start = prop.asObject().getProperty("start");
|
||||
JSValue end = prop.asObject().getProperty("end");
|
||||
|
||||
gradientDrawable.setColors(new int[]{start.asNumber().toInt(), end.asNumber().toInt()});
|
||||
}
|
||||
}
|
||||
JSValue orientation = prop.asObject().getProperty("orientation");
|
||||
|
||||
switch (orientation.asNumber().toInt()) {
|
||||
|
Reference in New Issue
Block a user