Skip to content

Commit

Permalink
fix bug broken pdf rendering for larger traces
Browse files Browse the repository at this point in the history
  • Loading branch information
lennet committed May 19, 2019
1 parent 1b462bb commit ff95687
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/FlameGraphCore/Renderer/CGBasedRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
var currentX: CGFloat = x
for node in nodes {
var currentWidth = totalWidth * CGFloat(node.symbol.percentage / maxPercentage)
if currentWidth < 1 {
if currentWidth < 1 || currentWidth.isNaN {
currentWidth = min(parentWidth / CGFloat(node.parentNode?.subNodes.count ?? 1), 1)
}

Expand Down

0 comments on commit ff95687

Please sign in to comment.