Skip to content

Commit

Permalink
Attempted fix for a crash reported on Discord
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Apr 9, 2022
1 parent bdfc512 commit f81f8ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion epaint/src/text/text_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ fn rows_from_paragraphs(
});
} else {
line_break(fonts, &paragraph, job, &mut rows);
rows.last_mut().unwrap().ends_with_newline = !is_last_paragraph;
if let Some(last_row) = out_rows.last_mut() {
last_row.ends_with_newline = !is_last_paragraph;
}
}
}
}
Expand Down

0 comments on commit f81f8ec

Please sign in to comment.