Skip to content

Commit 30316e8

Browse files
committed
Fix crash issue
Changes are from PhilJay#5376
1 parent 52d16f8 commit 30316e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

MPChartLib/src/main/java/com/github/mikephil/charting/charts/Chart.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ protected void drawMarkers(Canvas canvas) {
751751
Entry e = mData.getEntryForHighlight(highlight);
752752

753753
// make sure entry not null before using it
754-
if (e == null) {
754+
if (e == null || set == null) {
755755
continue;
756756
}
757757

MPChartLib/src/main/java/com/github/mikephil/charting/charts/CombinedChart.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ protected void drawMarkers(Canvas canvas) {
240240
IDataSet set = mData.getDataSetByHighlight(highlight);
241241

242242
Entry e = mData.getEntryForHighlight(highlight);
243-
if (e == null) {
243+
if (e == null || set == null) {
244244
continue;
245245
}
246246

0 commit comments

Comments
 (0)