diff --git a/source/main.pas b/source/main.pas index bb1a7d58..bf7a85e4 100644 --- a/source/main.pas +++ b/source/main.pas @@ -2725,8 +2725,10 @@ begin if m.SelAvail and (m.BlockBegin.Line = m.BlockEnd.Line) then FindDialogQuery.FindText := m.SelText - else + else try // GetWordAtRowCol throws an AV when no text is present FindDialogQuery.FindText := m.GetWordAtRowCol(m.CaretXY); + except + end; end;