Silence a harmless access violation in ApplicationDeActivate, triggered by changing the VCL style

This commit is contained in:
Ansgar Becker
2021-06-14 20:08:47 +02:00
parent 821371d667
commit 4c959ded83

View File

@ -13654,7 +13654,13 @@ begin
// Prevent completion window from showing up after Alt-Tab. See issue #2640
// and issue #3342
// Does not work for some reason in TApplicationEvents.OnDeactivate
SynCompletionProposal.Form.Enabled := False;
// Triggers an EAccessViolation when changing some VCL styles
try
SynCompletionProposal.Form.Enabled := False;
except
on E:EAccessViolation do
LogSQL(E.Message, lcError);
end;
// Gets activated again in SynCompletionProposalExecute
end;