We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f360887 + e3f6636 commit 7c2d22aCopy full SHA for 7c2d22a
MPChartLib/src/main/java/com/github/mikephil/charting/charts/Chart.java
@@ -761,8 +761,10 @@ protected void drawMarkers(Canvas canvas) {
761
762
for (Highlight highlight : mIndicesToHighlight) {
763
764
+ // When changing data sets and calling animation functions, sometimes an erroneous highlight is generated
765
+ // on the dataset that is removed. Null check to prevent crash
766
IDataSet set = mData.getDataSetByIndex(highlight.getDataSetIndex());
- if (!set.isVisible()) {
767
+ if (set == null || !set.isVisible()) {
768
continue;
769
}
770
0 commit comments