Skip fixups on empty lines.

This commit is contained in:
David Wendt 2020-06-01 21:55:39 -04:00
parent bd40295076
commit aae1f0ba7a
1 changed files with 4 additions and 0 deletions

View File

@ -93,6 +93,10 @@ impl<'a, 'gc> LayoutContext<'a, 'gc> {
/// Apply all indents and alignment to the current line, if necessary. /// Apply all indents and alignment to the current line, if necessary.
fn fixup_line(&mut self, mc: MutationContext<'gc, '_>) { fn fixup_line(&mut self, mc: MutationContext<'gc, '_>) {
if self.current_line.is_none() {
return;
}
let mut line = self.current_line; let mut line = self.current_line;
let mut line_bounds = None; let mut line_bounds = None;
while let Some(linebox) = line { while let Some(linebox) = line {