Skip to content

Commit

Permalink
Fix some NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesa2 committed Nov 28, 2023
1 parent a7d5e22 commit 5ef55da
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ class LineChart : BarLineChartBase<LineData?>, LineDataProvider {
}

override fun getLineData(): LineData {
return mData!!
mData?.let {
return it
} ?: run {
return LineData()
}
}

public override fun onDetachedFromWindow() {
Expand Down

0 comments on commit 5ef55da

Please sign in to comment.