Fix NPE
This commit is contained in:
parent
c473f77a4d
commit
772df1dd46
1 changed files with 1 additions and 1 deletions
|
@ -1049,7 +1049,7 @@ public class Algorithms {
|
|||
}
|
||||
|
||||
public static String gradientPaletteToString(int[] colors) {
|
||||
int[] src = colors.length == 3 ? colors : RouteColorize.colors;
|
||||
int[] src = (colors != null && colors.length == 3) ? colors : RouteColorize.colors;
|
||||
return Algorithms.colorToString(src[0]) + " " +
|
||||
Algorithms.colorToString(src[1]) + " " +
|
||||
Algorithms.colorToString(src[2]);
|
||||
|
|
Loading…
Reference in a new issue