MaskEdit: check if control can be focussed before focussing when validation fails in DoExit. Issue . Patch by Lutz Mändle.

git-svn-id: trunk@52837 -
This commit is contained in:
bart 2016-08-19 20:20:43 +00:00
parent 5230d13340
commit 5bf9ffa801

View File

@ -1778,7 +1778,9 @@ begin
FValidationFailed := False;
end ;
finally
if FValidationFailed then
//also check if control can be focussed, otherwise risk an exception while
//handling an exception, issue #0030482
if FValidationFailed and CanSetFocus then
begin
//debugln('TCustomMaskedit.DoExit: Validation failed');
SetFocus;