Skip to content

Commit

Permalink
Merge pull request ChartsOrg#937 from rofreg/master
Browse files Browse the repository at this point in the history
Fix a crash when using markers with a PieChart
  • Loading branch information
danielgindi committed Apr 12, 2016
2 parents f9fbcc1 + e599238 commit 5a0c25f
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 5a0c25f

Please sign in to comment.