From b1cb2d2856533ed014aa69b6796b9dfe99a2c712 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Wed, 24 Aug 2011 16:01:56 +0200 Subject: richview: stop a possible index out of bounds error when there is no text. --- docview/components/richtext/RichTextView.pas | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docview/components') 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; -- cgit v1.2.3-70-g09d2