Merge pull request #4802 from oatrice/fix_crash_solid_color_barchart
fix NPE when use solid color with barchart
This commit is contained in:
commit
9347dd1af7
2 changed files with 2 additions and 2 deletions
|
@ -144,7 +144,7 @@ public class BarChartRenderer extends BarLineScatterCandleBubbleRenderer {
|
|||
|
||||
trans.pointValuesToPixel(buffer.buffer);
|
||||
|
||||
final boolean isCustomFill = dataSet.getFills().size() > 0;
|
||||
final boolean isCustomFill = dataSet.getFills() != null && !dataSet.getFills().isEmpty();
|
||||
final boolean isSingleColor = dataSet.getColors().size() == 1;
|
||||
final boolean isInverted = mChart.isInverted(dataSet.getAxisDependency());
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ public class HorizontalBarChartRenderer extends BarChartRenderer {
|
|||
|
||||
trans.pointValuesToPixel(buffer.buffer);
|
||||
|
||||
final boolean isCustomFill = dataSet.getFills().size() > 0;
|
||||
final boolean isCustomFill = dataSet.getFills() != null && !dataSet.getFills().isEmpty();
|
||||
final boolean isSingleColor = dataSet.getColors().size() == 1;
|
||||
final boolean isInverted = mChart.isInverted(dataSet.getAxisDependency());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue