From 03616c91e9634cf3075935d55e6944fa39bbf877 Mon Sep 17 00:00:00 2001 From: Nick Matelli Date: Wed, 22 May 2019 13:13:36 -0700 Subject: [PATCH 1/2] Added a safety check before an unsafe array operation --- Source/Charts/Renderers/PieChartRenderer.swift | 4 +++- Source/Supporting Files/Info.plist | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Charts/Renderers/PieChartRenderer.swift b/Source/Charts/Renderers/PieChartRenderer.swift index c9716111dc..dd1deb68fe 100644 --- a/Source/Charts/Renderers/PieChartRenderer.swift +++ b/Source/Charts/Renderers/PieChartRenderer.swift @@ -880,7 +880,9 @@ open class PieChartRenderer: DataRenderer // Prepend selected slices before the already rendered unselected ones. // NOTE: - This relies on drawDataSet() being called before drawHighlighted in PieChartView. - accessibleChartElements.insert(contentsOf: highlightedAccessibleElements, at: 1) + if !accessibleChartElements.isEmpty { + accessibleChartElements.insert(contentsOf: highlightedAccessibleElements, at: 1) + } context.restoreGState() } diff --git a/Source/Supporting Files/Info.plist b/Source/Supporting Files/Info.plist index cd18856800..276a4c9a27 100644 --- a/Source/Supporting Files/Info.plist +++ b/Source/Supporting Files/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.3.0 + 3.3.1 CFBundleSignature ???? CFBundleVersion From e6b01f77f3d6b0ef160bad6ebfaba4cfd4e042c6 Mon Sep 17 00:00:00 2001 From: Xuan Date: Wed, 5 Jun 2019 08:54:19 +0800 Subject: [PATCH 2/2] Update Info.plist --- Source/Supporting Files/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Supporting Files/Info.plist b/Source/Supporting Files/Info.plist index 276a4c9a27..cd18856800 100644 --- a/Source/Supporting Files/Info.plist +++ b/Source/Supporting Files/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.3.1 + 3.3.0 CFBundleSignature ???? CFBundleVersion