FIX: Bug [0001107] "First run: on right panel call CtrlF1 and see AV"

This commit is contained in:
Alexander Koblov 2015-05-25 17:53:11 +00:00
commit 37926de914
2 changed files with 2 additions and 2 deletions

View file

@ -180,7 +180,7 @@ end;
procedure TBriefDrawGrid.IndexToCell(Index: Integer; out ACol, ARow: Integer);
begin
if (Index < 0) or (Index >= FBriefView.FFiles.Count) then
if (Index < 0) or (Index >= FBriefView.FFiles.Count) or (RowCount = 0) then
begin
ACol:= -1;
ARow:= -1;

View file

@ -376,7 +376,7 @@ end;
procedure TThumbDrawGrid.IndexToCell(Index: Integer; out ACol, ARow: Integer);
begin
if (Index < 0) or (Index >= FFileView.DisplayFiles.Count) then
if (Index < 0) or (Index >= FFileView.DisplayFiles.Count) or (ColCount = 0) then
begin
ACol:= -1;
ARow:= -1;