TSynEdit crashes when loading text
- Lazarus/FPC Version: Lazarus 2.2.2 (rev lazarus_2_2_2) FPC 3.2.2 x86_64-win64-win32/win64
- Operating System: Windows 10 Home
- CPU / Bitness: 64
What happens
When the button is clicked 2 times the program crashes
What did you expect
Not crash
Steps to reproduce
Just click twice the button
procedure TForm1.Button1Click(Sender: TObject);
var Str: String;
L: TStringList;
begin
L := TStringList.Create;
L.LoadFromFile('test.htm');
Str := L.Text;
L.Free;
SynEdit1.Text:=Str; //crashes
end;
Full code: https://forum.lazarus.freepascal.org/index.php/topic,63540.0.html
Edited by Domasz Domasz