Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilJay committed Nov 5, 2015
1 parent b2f4e26 commit b495a7d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected Highlight getStackedHighlight(Highlight old, BarDataSet set, int xInde
*/
protected int getClosestStackIndex(Range[] ranges, float value) {

if (ranges == null)
if (ranges == null || ranges.length == 0)
return 0;

int stackIndex = 0;
Expand Down Expand Up @@ -188,7 +188,7 @@ protected Range[] getRanges(BarEntry entry) {

float[] values = entry.getVals();

if (values == null)
if (values == null || values.length == 0)
return null;

float negRemain = -entry.getNegativeSum();
Expand Down

0 comments on commit b495a7d

Please sign in to comment.