summaryrefslogtreecommitdiff
path: root/docview/components
diff options
context:
space:
mode:
Diffstat (limited to 'docview/components')
-rw-r--r--docview/components/richtext/RichTextLayoutUnit.pas3
1 files changed, 2 insertions, 1 deletions
diff --git a/docview/components/richtext/RichTextLayoutUnit.pas b/docview/components/richtext/RichTextLayoutUnit.pas
index c44d14a6..606b7805 100644
--- a/docview/components/richtext/RichTextLayoutUnit.pas
+++ b/docview/components/richtext/RichTextLayoutUnit.pas
@@ -375,7 +375,8 @@ ProfileEvent('DEBUG: TRichTextLayout.Layout >>>>');
teTextEnd:
begin
DoLine( P, NextP, WordStartX + WordX );
- // end of text, done
+ // end of text, so it is safe to free CurrentLine created in DoLine()
+ CurrentLine.Free;
break;
end;