LCL: Use "try finally" block for function DefaultInputDialog. Issue #35451, patch from Serge Anvarov.

git-svn-id: trunk@61064 -
This commit is contained in:
juha 2019-04-26 16:08:59 +00:00
parent 94fcd9ed54
commit 09945b4668

View File

@ -33,7 +33,7 @@ begin
Form.DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('ShowInputDialog'){$ENDIF};
Form.CreateNew(nil, 0);
with Form do
begin
try
PopupMode := pmAuto;
BorderStyle := bsDialog;
Caption := InputCaption;
@ -95,6 +95,7 @@ begin
Value := Edit.Text;
Result := True;
end;
finally
Form.Free;
end;
end;