Skip to content

Commit

Permalink
ChartUtils Crash (Fixes ChartsOrg#1737)
Browse files Browse the repository at this point in the history
Check that i is valid after rounding to prevent a crash.
  • Loading branch information
ObjColumnist committed Oct 28, 2016
1 parent 8ef870a commit 2bae81d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Charts/Utils/ChartUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ open class ChartUtils

let i = roundToNextSignificant(number: Double(number))

if i.isInfinite
if i.isNaN || i.isInfinite
{
return 0
}
Expand Down

0 comments on commit 2bae81d

Please sign in to comment.