diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-24 16:01:56 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-08-24 16:01:56 +0200 |
commit | b1cb2d2856533ed014aa69b6796b9dfe99a2c712 (patch) | |
tree | c37a67f841b4dbf8619a2b5dfd82aeea174168d7 /docview | |
parent | dd13bbb113164e83fdf63a2b680c33b39fd80cdb (diff) | |
download | fpGUI-b1cb2d2856533ed014aa69b6796b9dfe99a2c712.tar.xz |
richview: stop a possible index out of bounds error when there is no text.
Diffstat (limited to 'docview')
-rw-r--r-- | docview/components/richtext/RichTextView.pas | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docview/components/richtext/RichTextView.pas b/docview/components/richtext/RichTextView.pas index ee8f59ec..9d5f4b76 100644 --- a/docview/components/richtext/RichTextView.pas +++ b/docview/components/richtext/RichTextView.pas @@ -774,6 +774,9 @@ var Shift: boolean; begin inherited HandleLMouseDown(x, y, shiftstate); + if FText = '' then + Exit; //==> no need to do anything further + Offset := 0; Position := FindPoint( X, Y, Line, Offset, Link ); FClickedLink := Link; |