IDE: messages: fixed crash on right click on progress line, bug #26595

git-svn-id: trunk@46440 -
This commit is contained in:
mattias 2014-10-05 23:00:00 +00:00
parent 4fc3beee0b
commit 76cc05063f

View File

@ -298,7 +298,7 @@ type
Property OnOptionsChanged: TNotifyEvent read FOnOptionsChanged write FOnOptionsChanged;
property Options: TMsgCtrlOptions read FOptions write SetOptions default MCDefaultOptions;
property SearchText: string read FSearchText write SetSearchText;
property SelectedLine: integer read GetSelectedLine write SetSelectedLine; // -1=header line
property SelectedLine: integer read GetSelectedLine write SetSelectedLine; // -1=header line, can be on progress line (=View.Count)
property SelectedView: TLMsgWndView read FSelectedView write SetSelectedView;
property ShowHint default true;
property SourceMarks: TETMarks read FSourceMarks write SetSourceMarks;
@ -2739,7 +2739,7 @@ begin
View:=MessagesCtrl.SelectedView;
if View<>nil then begin
LineNumber:=MessagesCtrl.SelectedLine;
if LineNumber>=0 then begin
if (LineNumber>=0) and (LineNumber<View.Lines.Count) then begin
Line:=View.Lines[LineNumber];
HasFilename:=Line.Filename<>'';
HasText:=Line.Msg<>'';