Skip to content

Commit

Permalink
Prevent the tessellator to panic when comparing a sorting key equal t…
Browse files Browse the repository at this point in the history
…o NaN
  • Loading branch information
Dollab authored and nical committed Nov 6, 2023
1 parent 6b4e3b9 commit 7efb247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/tessellation/src/fill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,7 @@ impl FillTessellator {
#[cfg_attr(feature = "profiling", inline(never))]
fn sort_edges_below(&mut self) {
self.edges_below
.sort_unstable_by(|a, b| a.sort_key.partial_cmp(&b.sort_key).unwrap());
.sort_unstable_by(|a, b| a.sort_key.partial_cmp(&b.sort_key).unwrap_or(Ordering::Equal));
}

#[cfg_attr(feature = "profiling", inline(never))]
Expand Down

0 comments on commit 7efb247

Please sign in to comment.