mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 09:19:32 +02:00
ValEdit: Fix crash in InsertRow if Strings.Count = 0.
Issue #0025144. git-svn-id: trunk@43109 -
This commit is contained in:
parent
9b3994023a
commit
00ac786d09
@ -819,7 +819,12 @@ begin
|
||||
Strings.BeginUpdate;
|
||||
try
|
||||
if Append then
|
||||
NewInd := Row - FixedRows + 1 //append after current row
|
||||
begin
|
||||
if (Strings.Count = 0) then //empty grid
|
||||
NewInd := 0
|
||||
else
|
||||
NewInd := Row - FixedRows + 1 //append after current row
|
||||
end
|
||||
else
|
||||
NewInd := Row - FixedRows; //insert it at current row
|
||||
Strings.InsertItem(NewInd, Line, Nil);
|
||||
|
Loading…
Reference in New Issue
Block a user