diff --git a/PieCharts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/PieCharts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/PieCharts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/PieCharts/Core/Chart/PieChart.swift b/PieCharts/Core/Chart/PieChart.swift index ed13c18..50f53ec 100644 --- a/PieCharts/Core/Chart/PieChart.swift +++ b/PieCharts/Core/Chart/PieChart.swift @@ -161,6 +161,7 @@ import UIKit public func insertSlice(index: Int, model: PieSliceModel) { guard index < slices.count else {print("Out of bounds index: \(index), slices count: \(slices.count), exit"); return} + guard model.value != 0 else {print("Cannot divide by 0 at index: \(index), exit"); return} for layer in layers { layer.clear()