ValEdit: Fix crash in InsertRow if Strings.Count = 0.

Issue #0025144.

git-svn-id: trunk@43109 -
This commit is contained in:
bart 2013-10-05 20:30:04 +00:00
parent 9b3994023a
commit 00ac786d09

View File

@ -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);