summaryrefslogtreecommitdiff
path: root/docview
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-24 16:01:56 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2011-08-24 16:01:56 +0200
commitb1cb2d2856533ed014aa69b6796b9dfe99a2c712 (patch)
treec37a67f841b4dbf8619a2b5dfd82aeea174168d7 /docview
parentdd13bbb113164e83fdf63a2b680c33b39fd80cdb (diff)
downloadfpGUI-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.pas3
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;