diff options
Diffstat (limited to 'docview/components/richtext')
-rw-r--r-- | docview/components/richtext/RichTextView.pas | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docview/components/richtext/RichTextView.pas b/docview/components/richtext/RichTextView.pas index 55395709..db8f8d86 100644 --- a/docview/components/richtext/RichTextView.pas +++ b/docview/components/richtext/RichTextView.pas @@ -716,7 +716,9 @@ begin if Length(FText) = 0 then exit; // no need to paint anything further. - Assert(FLayout <> nil, 'FLayout may not be nil at this point!'); + if FLayoutRequired then + // we haven't yet done a layout + Layout; if not Debug then Draw( 0, FLayout.FNumLines ) else |