diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2009-10-11 18:51:02 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2009-10-11 18:51:02 +0200 |
commit | 381b296426e7c91a2e89554a5b9d4998f1b6dd65 (patch) | |
tree | b326b7d777f3ccfa5472dbe69f2192a1a518b429 | |
parent | 914e0b9dbaee497bd9b7245e4c70123a404c82bb (diff) | |
download | fpGUI-381b296426e7c91a2e89554a5b9d4998f1b6dd65.tar.xz |
Minimized unnecessary painting which solved runtime crash.
Signed-off-by: Graeme Geldenhuys <graemeg@gmail.com>
-rwxr-xr-x | components/richtext/RichTextView.pas | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/richtext/RichTextView.pas b/components/richtext/RichTextView.pas index 7a37c49e..48b78c47 100755 --- a/components/richtext/RichTextView.pas +++ b/components/richtext/RichTextView.pas @@ -670,6 +670,9 @@ writeln('DEBUG: TRichTextView.HandlePaint >>>'); Exit; //==> end; + if Length(FText) = 0 then + exit; // no need to paint anything further. + Assert(FLayout <> nil, 'FLayout may not be nil at this point!'); Draw( 0, FLayout.FNumLines ); Canvas.ClearClipRect; |