mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 11:01:31 +02:00
ValEdit: fix crash on GetCells when empty rows are auto-added.
git-svn-id: trunk@43177 -
This commit is contained in:
parent
3c9d406abd
commit
ed6faba781
@ -1153,7 +1153,10 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
I:=ARow-FixedRows;
|
I:=ARow-FixedRows;
|
||||||
if (I=0) and (Strings.Count=0) then exit; //empty grid
|
if (I >= Strings.Count) then
|
||||||
|
//Either empty grid, or a row has been added and Strings hasn't been update yet
|
||||||
|
//the latter happens when rows are auto-added (issue #0025166)
|
||||||
|
Exit;
|
||||||
if ACol=0 then
|
if ACol=0 then
|
||||||
Result:=Strings.Names[I]
|
Result:=Strings.Names[I]
|
||||||
else if ACol=1 then
|
else if ACol=1 then
|
||||||
|
Loading…
Reference in New Issue
Block a user