You've already forked lazarus-ccr
fpspreadsheet: Fix memory leak occuring when the parser of a previously allocated formula record is changed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6521 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -1490,6 +1490,7 @@ begin
|
||||
if Result = nil then
|
||||
Result := PsFormula(Add(ARow, ACol));
|
||||
Result^.Text := AFormula; // unparsed formula
|
||||
FreeAndNil(Result^.Parser); // Destroy previously existing parser
|
||||
Result^.Parser := AParsedFormula; // if nil, will be parsed on next calculation
|
||||
Result^.CalcState := csNotCalculated;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user