LCL: Fix grids crashing when a key is pressed after the last row has been deleted (issue #34025)

git-svn-id: trunk@58623 -
This commit is contained in:
wp 2018-07-24 19:02:59 +00:00
parent b20cf40349
commit eadf7690aa

View File

@ -8221,7 +8221,7 @@ function TCustomGrid.EditingAllowed(ACol: Integer = -1): Boolean;
var
C: TGridColumn;
begin
Result:=(goEditing in options) and (ACol>=0) and (ACol<ColCount);
Result:=(goEditing in options) and (ACol>=0) and (ACol<ColCount) and (RowCount>FixedRows);
if Result and Columns.Enabled then begin
C:=ColumnFromGridColumn(ACol);
Result:=(C<>nil) and (not C.ReadOnly);