mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 08:29:47 +02:00
MaskEdit: check if control can be focussed before focussing when validation fails in DoExit. Issue #0030482. Patch by Lutz Mändle.
git-svn-id: trunk@52837 -
This commit is contained in:
parent
5230d13340
commit
5bf9ffa801
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user