Skip to content

Commit

Permalink
Fix a crash when using markers with a PieChart
Browse files Browse the repository at this point in the history
  • Loading branch information
rofreg committed Apr 11, 2016
1 parent 9bb5820 commit e599238
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Charts/Classes/Charts/ChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public class ChartViewBase: NSUIView, ChartDataProvider, ChartAnimatorDelegate
let highlight = _indicesToHighlight[i]
let xIndex = highlight.xIndex

let deltaX = _xAxis.axisRange
let deltaX = _xAxis?.axisRange ?? Double(_data?.xVals.count ?? 0 ) - 1
if xIndex <= Int(deltaX) && xIndex <= Int(CGFloat(deltaX) * _animator.phaseX)
{
let e = _data?.getEntryForHighlight(highlight)
Expand Down

0 comments on commit e599238

Please sign in to comment.