From 58c33f3c2b41cdefed7a4b260f9369236d218dd9 Mon Sep 17 00:00:00 2001 From: pmo Date: Wed, 20 Sep 2017 11:55:21 +0200 Subject: [PATCH] fix for crash when interval is NaN --- Source/Charts/Renderers/AxisRendererBase.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Charts/Renderers/AxisRendererBase.swift b/Source/Charts/Renderers/AxisRendererBase.swift index 0032c13dc2..9ac954d3fc 100644 --- a/Source/Charts/Renderers/AxisRendererBase.swift +++ b/Source/Charts/Renderers/AxisRendererBase.swift @@ -103,7 +103,7 @@ open class AxisRendererBase: Renderer let labelCount = axis.labelCount let range = abs(yMax - yMin) - if labelCount == 0 || range <= 0 || range.isInfinite + if labelCount == 0 || range <= 0 || range.isInfinite || range.isNaN { axis.entries = [Double]() axis.centeredEntries = [Double]()