Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ public T getEntryForXValue(float xValue, float closestToY) {

@Override
public T getEntryForIndex(int index) {
// Avoid an IndexOutOfBoundsException if we try access an item outside out list
if (index >= mValues.size()) return null;
return mValues.get(index);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ public void drawValues(Canvas c) {
y - valOffset, dataSet.getValueTextColor(j / 2));
}

if (entry.getIcon() != null && dataSet.isDrawIconsEnabled()) {
if (entry != null && entry.getIcon() != null && dataSet.isDrawIconsEnabled()) {

Drawable icon = entry.getIcon();

Expand Down