Fix crash in SynMemoQueryStatusChange when resizing main window with no active query tab

This commit is contained in:
Ansgar Becker
2021-01-08 11:00:17 +01:00
parent 3b381b642a
commit fdd73b1ffb

View File

@ -6707,6 +6707,9 @@ procedure TMainForm.SynMemoQueryStatusChange(Sender: TObject; Changes:
var
Edit: TSynMemo;
begin
// Crashed with scTopLine and an non-set ActiveQueryTab while resizing main window, so limit to modifications
if not (scModified in Changes) then
Exit;
// Don't ask for saving empty contents. See issue #614
Edit := Sender as TSynMemo;
if Edit.GetTextLen = 0 then begin